mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 10:03:57 +03:00
Fixes #148. Thanks @dvinegla.
This commit is contained in:
parent
c7a8056034
commit
278b3576f3
|
@ -188,7 +188,7 @@ class PerUserThrottling(BaseThrottle):
|
|||
|
||||
def get_cache_key(self):
|
||||
if self.auth.is_authenticated():
|
||||
ident = str(self.auth)
|
||||
ident = unicode(self.auth)
|
||||
else:
|
||||
ident = self.view.request.META.get('REMOTE_ADDR', None)
|
||||
return 'throttle_user_%s' % ident
|
||||
|
|
Loading…
Reference in New Issue
Block a user