Commit f34b9ff0 by Tom Christie

AnonRateThrottle should always allow authenticated users. Closes #994

parent 7bc63fbb
...@@ -96,6 +96,9 @@ class SimpleRateThrottle(BaseThrottle): ...@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment