aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/throttling.py
diff options
context:
space:
mode:
authorTom Christie2013-08-15 21:36:45 +0100
committerTom Christie2013-08-15 21:36:45 +0100
commitf34b9ff0498ca054bfe65b4da99b01d48ff052b8 (patch)
tree285b55b40bec56205a4139a3c0caaa0283bcdc5b /rest_framework/throttling.py
parent7bc63fbb11525c37fa73e1ffa9a6409a48aab4ac (diff)
downloaddjango-rest-framework-f34b9ff0498ca054bfe65b4da99b01d48ff052b8.tar.bz2
AnonRateThrottle should always allow authenticated users. Closes #994
Diffstat (limited to 'rest_framework/throttling.py')
-rw-r--r--rest_framework/throttling.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/rest_framework/throttling.py b/rest_framework/throttling.py
index f6bb1cc8..65b45593 100644
--- a/rest_framework/throttling.py
+++ b/rest_framework/throttling.py
@@ -96,6 +96,9 @@ class SimpleRateThrottle(BaseThrottle):
return True
self.key = self.get_cache_key(request, view)
+ if self.key is None:
+ return True
+
self.history = cache.get(self.key, [])
self.now = self.timer()