mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
server/snapshots: treat invalid users as anonymous
Fixes the crash described in #682
This commit is contained in:
@ -107,6 +107,9 @@ def _create(
|
||||
entity
|
||||
)
|
||||
|
||||
if auth_user and not auth_user.name:
|
||||
auth_user = None
|
||||
|
||||
snapshot = model.Snapshot()
|
||||
snapshot.creation_time = datetime.utcnow()
|
||||
snapshot.operation = operation
|
||||
|
Reference in New Issue
Block a user