From c5f5fe2b5545403ce7d9df955759438f7dc91b3b Mon Sep 17 00:00:00 2001 From: Lorenzo Balugani Date: Thu, 27 May 2021 11:34:38 +0200 Subject: [PATCH] Fix bug that prevented repos to be deleted part 2 --- nest_backend/routes/repository/repository.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nest_backend/routes/repository/repository.py b/nest_backend/routes/repository/repository.py index e173df0..f14037c 100644 --- a/nest_backend/routes/repository/repository.py +++ b/nest_backend/routes/repository/repository.py @@ -203,6 +203,11 @@ def page_repository(rid): ext.session.commit() # Deleting conditions... for condition in repository.conditions: + for c in condition.tweets: + ext.session.delete(c) + for c in condition.alerts: + ext.session.delete(c) + ext.session.commit() ext.session.delete(condition) ext.session.commit() # Deleting Alerts...