fix 500 error

master
Aevann 2024-04-16 23:31:07 +02:00
parent e7a7784047
commit 28da199b5b
1 changed files with 14 additions and 13 deletions

View File

@ -285,8 +285,9 @@ def remove_orgy(v, created_utc, chat_id):
elif v.id != chat.owner_id:
abort(403, "Only the chat owner can manage its orgies!")
orgy = g.db.query(Orgy).filter_by(created_utc=created_utc).one()
orgy = g.db.query(Orgy).filter_by(created_utc=created_utc).one_or_none()
if orgy:
if chat.id == 1:
ma = ModAction(
kind="remove_orgy",