master
Aevann1 2021-09-06 00:56:48 +02:00
parent b9b3ab3d75
commit 544eca28bf
1 changed files with 4 additions and 2 deletions

View File

@ -23,8 +23,10 @@ def get_logged_in_user():
uid = session.get("user_id") uid = session.get("user_id")
nonce = session.get("login_nonce", 0) nonce = session.get("login_nonce", 0)
if not uid: x= (None, None) if not uid: x= (None, None)
if g.db: v = g.db.query(User).filter_by(id=uid).first() try:
else: v = None if g.db: v = g.db.query(User).filter_by(id=uid).first()
else: v = None
except: v = None
if v and v.agendaposter_expires_utc and v.agendaposter_expires_utc < g.timestamp: if v and v.agendaposter_expires_utc and v.agendaposter_expires_utc < g.timestamp:
v.agendaposter_expires_utc = 0 v.agendaposter_expires_utc = 0