server/snapshots: treat invalid users as anonymous

Fixes the crash described in #682
This commit is contained in:
Eva
2025-03-27 13:33:48 +01:00
parent 782f069031
commit 0b99b98f9e

View File

@ -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