improve actor_email assigment; the previous was not intuitive enough to understand (#720)

This commit is contained in:
Bahram Aghaei 2025-04-30 11:14:34 +02:00 committed by GitHub
parent 3f7f005377
commit ecdefde9ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -66,7 +66,7 @@ def _set_actor(user, sender, instance, signal_duid, **kwargs):
and instance.actor is None
):
instance.actor = user
instance.actor_email = hasattr(user, "email") and user.email or None
instance.actor_email = getattr(user, "email", None)
instance.remote_addr = auditlog["remote_addr"]
instance.remote_port = auditlog["remote_port"]