Skip to content

Commit 0fdb76c

Browse files
committed
Fixed: crash when creating TRADING accounts
1 parent 7c4087c commit 0fdb76c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

app/src/main/java/org/gnucash/android/ui/account/AccountFormFragment.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ private String getAllowedParentAccountTypes(AccountType type) {
598598

599599
case INCOME:
600600
case EXPENSE:
601-
return "'" + AccountType.EXPENSE + "', '" + AccountType.INCOME + "'";
601+
return "'" + AccountType.EXPENSE.name() + "', '" + AccountType.INCOME.name() + "'";
602602

603603
case CASH:
604604
case BANK:
@@ -618,6 +618,9 @@ private String getAllowedParentAccountTypes(AccountType type) {
618618
return "'" + TextUtils.join("','", accountTypeStrings) + "'";
619619
}
620620

621+
case TRADING:
622+
return "'" + AccountType.TRADING.name() + "'";
623+
621624
case ROOT:
622625
default:
623626
return Arrays.toString(AccountType.values()).replaceAll("\\[|]", "");

0 commit comments

Comments
 (0)