#5 Having no periods breaks the "expenses per period" graph on the account overview page

This commit is contained in:
2020-12-25 02:29:19 +01:00
parent f7a7a5bec2
commit ddada74d00
2 changed files with 8 additions and 3 deletions

View File

@@ -17,7 +17,7 @@
<properties> <properties>
<packaging.type>jar</packaging.type> <packaging.type>jar</packaging.type>
<activeProfiles>postgres,dev</activeProfiles> <activeProfiles>hsqldb,dev</activeProfiles>
<deploymentProfile>mk</deploymentProfile> <deploymentProfile>mk</deploymentProfile>
</properties> </properties>

View File

@@ -286,8 +286,13 @@ public class TransactionService {
* @see TransactionService#getExpensesCurrentPeriod() * @see TransactionService#getExpensesCurrentPeriod()
*/ */
public List<Long> getExpensesAllPeriods() { public List<Long> getExpensesAllPeriods() {
return this.transactionRepository try {
.getExpensesForAllPeriods(PeriodType.EXPENSE, AccountType.START, AccountType.EXPENSE, AccountType.LIABILITY); return this.transactionRepository
.getExpensesForAllPeriods(PeriodType.EXPENSE, AccountType.START, AccountType.EXPENSE, AccountType.LIABILITY);
}
catch (Exception e) {
return Collections.singletonList(Long.valueOf(0));
}
} }
/** /**