Skip to content

Commit

Permalink
fix(usersessions): User is not part of the unique key
Browse files Browse the repository at this point in the history
  • Loading branch information
pennersr committed Dec 12, 2023
1 parent 1b43b5e commit 69e1818
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion allauth/usersessions/models.py
Expand Up @@ -25,9 +25,9 @@ def create_from_request(self, request):
0 : UserSession._meta.get_field("user_agent").max_length
]
UserSession.objects.update_or_create(
user=request.user,
session_key=request.session.session_key,
defaults=dict(
user=request.user,
ip=get_adapter().get_client_ip(request),
user_agent=ua,
last_seen_at=timezone.now(),
Expand Down

0 comments on commit 69e1818

Please sign in to comment.