mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-04-26 03:53:42 +03:00
AnonRateThrottle should always allow authenticated users. Closes #994
This commit is contained in:
parent
7bc63fbb11
commit
f34b9ff049
|
@ -96,6 +96,9 @@ class SimpleRateThrottle(BaseThrottle):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
self.key = self.get_cache_key(request, view)
|
self.key = self.get_cache_key(request, view)
|
||||||
|
if self.key is None:
|
||||||
|
return True
|
||||||
|
|
||||||
self.history = cache.get(self.key, [])
|
self.history = cache.get(self.key, [])
|
||||||
self.now = self.timer()
|
self.now = self.timer()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user