[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:
|
if event is None:
|
||||||
raise NotFound
|
raise NotFound
|
||||||
if not with_backup:
|
if not with_backup:
|
||||||
return clear_backup(event)
|
clear_backup(event)
|
||||||
return event
|
return event
|
||||||
|
|
||||||
|
|
||||||
|
@ -154,6 +154,7 @@ def delete_event(event_id):
|
||||||
NotFound if not found
|
NotFound if not found
|
||||||
"""
|
"""
|
||||||
event = get_event(event_id)
|
event = get_event(event_id)
|
||||||
|
logger.info(f"{type(event)} {event.__str__}")
|
||||||
db.session.delete(event)
|
db.session.delete(event)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue