diff --git a/entity/Notification_entity/recordcontainers/db/onDBDelete.js b/entity/Notification_entity/recordcontainers/db/onDBDelete.js index 05d1a30c0a4efc49d64aab055ed9b58109aba6f6..54618e0f77334d441107ac955591986a7540f4d0 100644 --- a/entity/Notification_entity/recordcontainers/db/onDBDelete.js +++ b/entity/Notification_entity/recordcontainers/db/onDBDelete.js @@ -1,5 +1,7 @@ import("system.vars"); import("system.notification"); -// Deletes notificationContents from its table, if there are no -notification.deleteContentIfOrphan(vars.get("$field.ID"), vars.get("$field.CONTENTID")); \ No newline at end of file +// Deletes notificationContents from its table, if there are no user notification left +// Only AppointmentContents need to stay, because they would appear again after every deletion. +if(vars.get("$field.TYPECODE") != "_____SYSTEM_NOTIFICATION_APPOINTMENT") + notification.deleteContentIfOrphan(vars.get("$field.ID"), vars.get("$field.CONTENTID")); \ No newline at end of file