Update app.py

This commit is contained in:
dev 2026-10-30 05:41:05 +00:00
parent 9dc2bc6311
commit cbf6a0498b

3
app.py
View File

@ -844,7 +844,7 @@ def csrf_valid() -> bool:
return bool(supplied and expected and hmac.compare_digest(supplied, expected)) return bool(supplied and expected and hmac.compare_digest(supplied, expected))
def user_payload(row: sqlite3.Row) -> dict: def user_payload(row: sqlite3.Row, settings_row: sqlite3.Row | None = None) -> dict:
status = row["status"] status = row["status"]
restricted_until = parse_iso(row["restricted_until"]) restricted_until = parse_iso(row["restricted_until"])
if status == "restricted" and restricted_until and restricted_until <= utc_now(): if status == "restricted" and restricted_until and restricted_until <= utc_now():
@ -857,7 +857,6 @@ def user_payload(row: sqlite3.Row) -> dict:
"restricted_until": row["restricted_until"], "restricted_until": row["restricted_until"],
} }
def current_user() -> Optional[dict]: def current_user() -> Optional[dict]:
user_id = session.get("user_id") user_id = session.get("user_id")
if not user_id: if not user_id: