mirror of
https://github.com/correl/mage.git
synced 2024-12-27 03:00:13 +00:00
Improved CardCriteria to handle no selected color or card type without exception.
This commit is contained in:
parent
4b2e6a8bc0
commit
caa07069b4
1 changed files with 9 additions and 3 deletions
|
@ -256,11 +256,17 @@ public class CardCriteria {
|
||||||
where.and(5);
|
where.and(5);
|
||||||
colorClauses++;
|
colorClauses++;
|
||||||
}
|
}
|
||||||
|
if (colorClauses > 0) {
|
||||||
where.or(colorClauses);
|
where.or(colorClauses);
|
||||||
clausesCount++;
|
clausesCount++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (clausesCount > 0) {
|
||||||
where.and(clausesCount);
|
where.and(clausesCount);
|
||||||
|
} else {
|
||||||
|
where.eq("cardNumber", new SelectArg(0));
|
||||||
|
}
|
||||||
|
|
||||||
if (start != null) {
|
if (start != null) {
|
||||||
qb.offset(start);
|
qb.offset(start);
|
||||||
|
|
Loading…
Reference in a new issue