Skip to content
Snippets Groups Projects
Commit 70c9c325 authored by Pierre-antoine Comby's avatar Pierre-antoine Comby
Browse files

Merge branch 'fix_signin' into 'master'

Fix anonymous users issue

See merge request !35
parents 5b995f16 09137dd9
No related branches found
No related tags found
1 merge request!35Fix anonymous users issue
Pipeline #7847 passed with warnings with stages
in 4 minutes and 2 seconds
......@@ -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