Do not always clear tenant and application level notifications on submit
@@ -542,7 +542,7 @@ public class ApplicationController {
controller.jobController().deploymentStatus(application.get());
for (Notification notification : controller.notificationsDb().listNotifications(NotificationSource.from(application.get().id()), true)) {
- if ( ! notification.source().instance().map(declaredInstances::contains).orElse(false))
+ if ( ! notification.source().instance().map(declaredInstances::contains).orElse(true))
controller.notificationsDb().removeNotifications(notification.source());
if (notification.source().instance().isPresent() &&
! notification.source().zoneId().map(application.get().require(notification.source().instance().get()).deployments()::containsKey).orElse(false))
