User session tracking #93587

Merged
Oleg-Komarov merged 18 commits from user-session into main 2024-08-02 16:04:09 +02:00
Showing only changes of commit 0662506ffe - Show all commits

View File

@ -669,8 +669,6 @@ class UserSession(models.Model):
def update_or_create_from_request(cls, request, user=None):
if not user:
user = request.user
if not request.session.session_key:
request.session.save()
return cls.objects.update_or_create(
session_id=request.session.session_key,
defaults={