Fixed that for some of the day / night cards the night side instead of the day side was found if the card was read from repository.

This commit is contained in:
LevelX2 2013-08-05 18:05:13 +02:00
parent 2225c6f988
commit 062a00f65e

View file

@ -203,7 +203,7 @@ public enum CardRepository {
public CardInfo findCard(String setCode, int cardNumber) {
try {
QueryBuilder<CardInfo, Object> queryBuilder = cardDao.queryBuilder();
queryBuilder.where().eq("setCode", new SelectArg(setCode)).and().eq("cardNumber", cardNumber);
queryBuilder.where().eq("setCode", new SelectArg(setCode)).and().eq("cardNumber", cardNumber).and().eq("nightCard", false);
List<CardInfo> result = cardDao.query(queryBuilder.prepare());
if (!result.isEmpty()) {
return result.get(0);