API: Upload new version of an extension #138
@ -1,4 +1,4 @@
|
||||
import datetime
|
||||
from django.utils import timezone
|
||||
|
||||
from rest_framework.authentication import BaseAuthentication
|
||||
from rest_framework.exceptions import AuthenticationFailed
|
||||
@ -27,7 +27,7 @@ class UserTokenAuthentication(BaseAuthentication):
|
||||
raise AuthenticationFailed('Invalid token')
|
||||
|
||||
token.ip_address_last_access = clean_ip_address(request)
|
||||
token.date_last_access = datetime.datetime.now()
|
||||
token.date_last_access = timezone.now()
|
||||
token.save(update_fields={'ip_address_last_access', 'date_last_access'})
|
||||
|
||||
return (token.user, token)
|
||||
|
Loading…
Reference in New Issue
Block a user