fix earlier bad commit that broke shit

master
Aevann 2023-10-03 10:42:52 +03:00
parent 6d4b4fdb80
commit 926fb50b6c
1 changed files with 3 additions and 4 deletions

View File

@ -36,10 +36,9 @@ def get_orgy(v):
if not (v and v.allowed_in_chat): return None
orgy = g.db.query(Orgy).one_or_none()
if not orgy: return False
if orgy.end_utc and orgy.end_utc < time.time():
if orgy and orgy.end_utc and orgy.end_utc < time.time():
g.db.delete(orgy)
return False
return None
return True
return orgy