From 409eac7465e1ec832630638e0e7dc48ae91204f9 Mon Sep 17 00:00:00 2001 From: Lorenzo Balugani Date: Thu, 27 May 2021 10:57:37 +0200 Subject: [PATCH] Fix bug that prevented alert to be deleted part 2 --- nest_backend/routes/repository/alerts/alert.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nest_backend/routes/repository/alerts/alert.py b/nest_backend/routes/repository/alerts/alert.py index f9bd4b2..315a800 100644 --- a/nest_backend/routes/repository/alerts/alert.py +++ b/nest_backend/routes/repository/alerts/alert.py @@ -185,6 +185,9 @@ def page_alert(aid): if not condition.repository_id: ext.session.delete(condition) ext.session.commit() + for notification in alert.notifications: + ext.session.delete(notification) + ext.session.commit() ext.session.delete(alert) ext.session.commit() except Exception as e: