User session tracking #93587
@ -669,8 +669,6 @@ class UserSession(models.Model):
|
|||||||
def update_or_create_from_request(cls, request, user=None):
|
def update_or_create_from_request(cls, request, user=None):
|
||||||
if not user:
|
if not user:
|
||||||
user = request.user
|
user = request.user
|
||||||
if not request.session.session_key:
|
|
||||||
request.session.save()
|
|
||||||
return cls.objects.update_or_create(
|
return cls.objects.update_or_create(
|
||||||
session_id=request.session.session_key,
|
session_id=request.session.session_key,
|
||||||
defaults={
|
defaults={
|
||||||
|
Loading…
Reference in New Issue
Block a user