Merge pull request #5822 from rafaeldamasceno/fix-second-side-retrieval

Fix #5821 by finding in preferred set
This commit is contained in:
Oleg Agafonov 2019-05-29 09:57:47 +02:00 committed by GitHub
commit 419f43e726
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -439,7 +439,7 @@ public class DownloadPicturesService extends DefaultBoundedRangeModel implements
throw new IllegalStateException("Second side card can't have empty name.");
}
CardInfo secondSideCard = CardRepository.instance.findCard(card.getSecondSideName());
CardInfo secondSideCard = CardRepository.instance.findCardWPreferredSet(card.getSecondSideName(), card.getSetCode(), false);
if (secondSideCard == null) {
throw new IllegalStateException("Can''t find second side card in database: " + card.getSecondSideName());
}