diff options
| author | Jeremy Satterfield | 2013-08-13 15:31:58 -0500 | 
|---|---|---|
| committer | Jeremy Satterfield | 2013-08-13 15:31:58 -0500 | 
| commit | 1d8a80f5cc41f157403771439f15c9b7d615a43b (patch) | |
| tree | a8b97df1665f9eb4cdab9d6a2a8585cf1094d2c6 /rest_framework/views.py | |
| parent | 999056cde1c6355d5ca036f109b35b41cb9d47cc (diff) | |
| download | django-rest-framework-1d8a80f5cc41f157403771439f15c9b7d615a43b.tar.bz2 | |
don't set X-Throttle-Wait-Second header if throttle wait is None
Diffstat (limited to 'rest_framework/views.py')
| -rw-r--r-- | rest_framework/views.py | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/rest_framework/views.py b/rest_framework/views.py index 37bba7f0..d51233a9 100644 --- a/rest_framework/views.py +++ b/rest_framework/views.py @@ -269,7 +269,7 @@ class APIView(View):          Handle any exception that occurs, by returning an appropriate response,          or re-raising the error.          """ -        if isinstance(exc, exceptions.Throttled): +        if isinstance(exc, exceptions.Throttled) and exc.wait is not None:              # Throttle wait header              self.headers['X-Throttle-Wait-Seconds'] = '%d' % exc.wait | 
