Skip to content
Snippets Groups Projects
Commit e04092f2 authored by ynerant's avatar ynerant
Browse files

Fix anonymous users issue

parent bd13f988
No related branches found
No related tags found
No related merge requests found
......@@ -78,6 +78,10 @@ def save_object(sender, instance, **kwargs):
user, ip = get_user_and_ip(sender)
from django.contrib.auth.models import AnonymousUser
if isinstance(user, AnonymousUser):
user = None
if user is not None and instance._meta.label_lower == "auth.user" and previous:
# Don't save last login modifications
if instance.last_login != previous.last_login:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment