Skip to content
Snippets Groups Projects
Commit dab48cb7 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

Fixed #570 - readonly accounts: select default instead of first from list

parent 48eb02a3
Branches
Tags
No related merge requests found
......@@ -84,6 +84,12 @@ public class TemplateService implements Resetable
final Account selectedAccount = accountService.getRepository().findByIsSelected(true);
template.setAccount(selectedAccount);
}
final Account account = template.getAccount();
if(account != null && account.isReadOnly())
{
template.setAccount(accountService.getRepository().findByIsDefault(true));
}
}
public void prepareModelNewOrEdit(Model model, boolean isEdit, TransactionBase item, List<Account> accounts)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment