diff options
Diffstat (limited to 'rest_framework/throttling.py')
| -rw-r--r-- | rest_framework/throttling.py | 2 | 
1 files changed, 2 insertions, 0 deletions
| diff --git a/rest_framework/throttling.py b/rest_framework/throttling.py index c40f3065..fc24c92e 100644 --- a/rest_framework/throttling.py +++ b/rest_framework/throttling.py @@ -155,6 +155,8 @@ class SimpleRateThrottle(BaseThrottle):              remaining_duration = self.duration          available_requests = self.num_requests - len(self.history) + 1 +        if available_requests <= 0: +            return None          return remaining_duration / float(available_requests) | 
