diff --git a/BudgetMasterServer/src/main/java/de/deadlocker8/budgetmaster/accounts/AccountController.java b/BudgetMasterServer/src/main/java/de/deadlocker8/budgetmaster/accounts/AccountController.java index 367a6ee19ab2d1f1eb5934b3b3923647f12f1b08..c97ea17f2044416db1871e26de94387a0a30ac39 100644 --- a/BudgetMasterServer/src/main/java/de/deadlocker8/budgetmaster/accounts/AccountController.java +++ b/BudgetMasterServer/src/main/java/de/deadlocker8/budgetmaster/accounts/AccountController.java @@ -175,7 +175,9 @@ public class AccountController extends BaseController // executed BEFORE this controller method and therefore the notifications list is empty in the // resulting page. // Quickfix: explicitly set the model attribute "notifications" - model.addAttribute(ModelAttributes.NOTIFICATIONS, List.of(notification)); + final List<Notification> notifications = WebRequestUtils.getNotifications(webRequest); + notifications.add(notification); + model.addAttribute(ModelAttributes.NOTIFICATIONS, notifications); bindingResult.addError(new FieldError("NewAccount", "state", account.getAccountState(), false, new String[]{"warning.account.edit.state"}, null, null)); }