diff options
| author | tom christie tom@tomchristie.com | 2011-02-01 21:05:49 +0000 |
|---|---|---|
| committer | tom christie tom@tomchristie.com | 2011-02-01 21:05:49 +0000 |
| commit | e19816598973cb40b2d331d61c399ed90c81f430 (patch) | |
| tree | b2076e4009660b435125eb80da2f22ab00b9d615 /djangorestframework/authenticators.py | |
| parent | 0c6f682cd0e03c06298cec78e79d10a87426fca8 (diff) | |
| download | django-rest-framework-e19816598973cb40b2d331d61c399ed90c81f430.tar.bz2 | |
Tests for MSIE accept header munging
Diffstat (limited to 'djangorestframework/authenticators.py')
| -rw-r--r-- | djangorestframework/authenticators.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/djangorestframework/authenticators.py b/djangorestframework/authenticators.py index 8de182de..24addb22 100644 --- a/djangorestframework/authenticators.py +++ b/djangorestframework/authenticators.py @@ -38,7 +38,7 @@ class BasicAuthenticator(BaseAuthenticator): class UserLoggedInAuthenticator(BaseAuthenticator): """Use Djagno's built-in request session for authentication.""" def authenticate(self, request): - if request.user and request.user.is_active: + if getattr(request, 'user', None) and request.user.is_active: return request.user return None |
