diff options
| author | Philip Douglas | 2013-08-16 07:15:09 -0700 |
|---|---|---|
| committer | Philip Douglas | 2013-08-16 07:15:09 -0700 |
| commit | ef7ce344865938bea285a408a7cc415a7b90a83c (patch) | |
| tree | 1bfa78c86e422f81cf836319d91c626c763d5b24 /rest_framework/throttling.py | |
| parent | c058ab36b13a6979c57760d9af2eb21ec3165e7d (diff) | |
| parent | c1ccd8b5b5aef1bd209862f9431c9c03e25ae755 (diff) | |
| download | django-rest-framework-ef7ce344865938bea285a408a7cc415a7b90a83c.tar.bz2 | |
Merge pull request #3 from tomchristie/master
Update to latest
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() |
