1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-22 13:04:19 +00:00

Fix bug that prevented repos to be deleted part 2

This commit is contained in:
Lorenzo Balugani 2021-05-27 11:34:38 +02:00
parent e1024af599
commit c5f5fe2b55

View file

@ -203,6 +203,11 @@ def page_repository(rid):
ext.session.commit() ext.session.commit()
# Deleting conditions... # Deleting conditions...
for condition in repository.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.delete(condition)
ext.session.commit() ext.session.commit()
# Deleting Alerts... # Deleting Alerts...