fix 500 error
parent
e7a7784047
commit
28da199b5b
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue