[events] Fix deleteing an event

This commit is contained in:
Ferdinand Thiessen 2021-11-11 12:23:45 +01:00
parent cadde543f2
commit 2dabd1dd34
1 changed files with 2 additions and 1 deletions

View File

@ -116,7 +116,7 @@ def get_event(event_id, with_backup=False) -> Event:
if event is None:
raise NotFound
if not with_backup:
return clear_backup(event)
clear_backup(event)
return event
@ -154,6 +154,7 @@ def delete_event(event_id):
NotFound if not found
"""
event = get_event(event_id)
logger.info(f"{type(event)} {event.__str__}")
db.session.delete(event)
db.session.commit()