[events] Fix deleteing an event
This commit is contained in:
parent
cadde543f2
commit
2dabd1dd34
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue