Fix AttributeError in LogEntry

This commit is contained in:
Raphael Michel
2017-10-11 09:50:01 +02:00
parent b2c49aa786
commit 3f8df0f036

View File

@@ -53,7 +53,7 @@ class LoggingMixin:
event = self event = self
elif hasattr(self, 'event'): elif hasattr(self, 'event'):
event = self.event event = self.event
if not user.is_authenticated: if user and not user.is_authenticated:
user = None user = None
l = LogEntry(content_object=self, user=user, action_type=action, event=event, api_token=api_token) l = LogEntry(content_object=self, user=user, action_type=action, event=event, api_token=api_token)
if data: if data: