fix that anonymous pastebins returned user None instead of Anonymous

This commit is contained in:
spitkov 2024-10-05 20:29:58 +02:00
parent c3a8994769
commit 92ca08c1ed

2
app.py
View File

@ -668,7 +668,7 @@ def upload_pastebin():
vanity = shortuuid.uuid()[:8] vanity = shortuuid.uuid()[:8]
print(f"Generated vanity: {vanity}") print(f"Generated vanity: {vanity}")
user_id = current_user.id if current_user.is_authenticated else None user_id = current_user.id if current_user.is_authenticated else Anonymous
print(f"User ID: {user_id}") print(f"User ID: {user_id}")
db = get_db() db = get_db()