diff options
| author | Tom Christie | 2013-08-15 21:36:45 +0100 | 
|---|---|---|
| committer | Tom Christie | 2013-08-15 21:36:45 +0100 | 
| commit | f34b9ff0498ca054bfe65b4da99b01d48ff052b8 (patch) | |
| tree | 285b55b40bec56205a4139a3c0caaa0283bcdc5b /rest_framework/throttling.py | |
| parent | 7bc63fbb11525c37fa73e1ffa9a6409a48aab4ac (diff) | |
| download | django-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.py | 3 | 
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() | 
