mirror of
https://github.com/jazzband/django-auditlog.git
synced 2026-03-16 22:20:26 +00:00
improve actor_email assigment; the previous was not intuitive enough to understand (#720)
This commit is contained in:
parent
3f7f005377
commit
ecdefde9ed
1 changed files with 1 additions and 1 deletions
|
|
@ -66,7 +66,7 @@ def _set_actor(user, sender, instance, signal_duid, **kwargs):
|
||||||
and instance.actor is None
|
and instance.actor is None
|
||||||
):
|
):
|
||||||
instance.actor = user
|
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_addr = auditlog["remote_addr"]
|
||||||
instance.remote_port = auditlog["remote_port"]
|
instance.remote_port = auditlog["remote_port"]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue