Update app.py
This commit is contained in:
parent
9dc2bc6311
commit
cbf6a0498b
3
app.py
3
app.py
@ -844,7 +844,7 @@ def csrf_valid() -> bool:
|
||||
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"]
|
||||
restricted_until = parse_iso(row["restricted_until"])
|
||||
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"],
|
||||
}
|
||||
|
||||
|
||||
def current_user() -> Optional[dict]:
|
||||
user_id = session.get("user_id")
|
||||
if not user_id:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user