mirror of
https://github.com/jazzband/django-auditlog.git
synced 2026-03-16 22:20:26 +00:00
Only set the actor when it was not set explicitly
This commit is contained in:
parent
6dd93496b6
commit
b66ada0baa
1 changed files with 1 additions and 1 deletions
|
|
@ -24,5 +24,5 @@ class AuditLogMiddleware(object):
|
|||
return response
|
||||
|
||||
def set_actor(self, user, sender, instance, **kwargs):
|
||||
if sender == LogEntry and isinstance(user, settings.AUTH_USER_MODEL):
|
||||
if sender == LogEntry and isinstance(user, settings.AUTH_USER_MODEL) and instance.actor is None:
|
||||
instance.actor = user
|
||||
|
|
|
|||
Loading…
Reference in a new issue