#5 Having no periods breaks the "expenses per period" graph on the account overview page
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
<properties>
|
||||
<packaging.type>jar</packaging.type>
|
||||
<activeProfiles>postgres,dev</activeProfiles>
|
||||
<activeProfiles>hsqldb,dev</activeProfiles>
|
||||
<deploymentProfile>mk</deploymentProfile>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -286,8 +286,13 @@ public class TransactionService {
|
||||
* @see TransactionService#getExpensesCurrentPeriod()
|
||||
*/
|
||||
public List<Long> getExpensesAllPeriods() {
|
||||
return this.transactionRepository
|
||||
.getExpensesForAllPeriods(PeriodType.EXPENSE, AccountType.START, AccountType.EXPENSE, AccountType.LIABILITY);
|
||||
try {
|
||||
return this.transactionRepository
|
||||
.getExpensesForAllPeriods(PeriodType.EXPENSE, AccountType.START, AccountType.EXPENSE, AccountType.LIABILITY);
|
||||
}
|
||||
catch (Exception e) {
|
||||
return Collections.singletonList(Long.valueOf(0));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user