mirror of
https://github.com/Qortal/qortal.git
synced 2025-03-14 03:22:32 +00:00
bug fix, no rows should return zero counts instead of throwing an exception
This commit is contained in:
parent
a530b64ae7
commit
5a691762ed
@ -1296,8 +1296,11 @@ public class HSQLDBAccountRepository implements AccountRepository {
|
||||
transferAssetCount = countsByType.getOrDefault(12, 0);
|
||||
transferPrivsCount = countsByType.getOrDefault(40, 0);
|
||||
}
|
||||
// no rows -> no counts
|
||||
else {
|
||||
throw new DataException("trouble fetching counts for transaction types");
|
||||
arbitraryCount = 0;
|
||||
transferAssetCount = 0;
|
||||
transferPrivsCount = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -1333,8 +1336,13 @@ public class HSQLDBAccountRepository implements AccountRepository {
|
||||
buyCount = countsByDirection.getOrDefault(BUY, 0);
|
||||
buyAmount = amountsByDirection.getOrDefault(BUY, 0);
|
||||
}
|
||||
// no rows -> no counts
|
||||
else {
|
||||
throw new DataException("trouble fetching counts for buy/sell transactions");
|
||||
sellCount = 0;
|
||||
sellAmount = 0;
|
||||
|
||||
buyCount = 0;
|
||||
buyAmount = 0;
|
||||
}
|
||||
|
||||
return new SponsorshipReport(
|
||||
|
Loading…
x
Reference in New Issue
Block a user