mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-17 11:49:29 +00:00
Oops, missed the created tuple split
This commit is contained in:
@@ -58,6 +58,6 @@ class IPTrackingMiddleware(object):
|
|||||||
def process_request(self, request):
|
def process_request(self, request):
|
||||||
|
|
||||||
if request.user and not request.user.is_anonymous():
|
if request.user and not request.user.is_anonymous():
|
||||||
ip = SSOUserIPAddress.objects.get_or_create(user=request.user, ip_address=request.META['REMOTE_ADDR'])
|
ip, created = SSOUserIPAddress.objects.get_or_create(user=request.user, ip_address=request.META['REMOTE_ADDR'])
|
||||||
ip.last_seen = datetime.utcnow()
|
ip.last_seen = datetime.utcnow()
|
||||||
ip.save()
|
ip.save()
|
||||||
|
|||||||
Reference in New Issue
Block a user