diff options
| author | Tom Christie | 2015-02-09 20:43:50 +0000 | 
|---|---|---|
| committer | Tom Christie | 2015-02-09 20:43:50 +0000 | 
| commit | fbb21caaaa01033bbd34b0c63ab48243ffb6310e (patch) | |
| tree | 5d0fdee18c9bf02733b1df913c4cddd9e3e86da7 /rest_framework/authentication.py | |
| parent | 407480b4840990ff17f9a33b293cfcf15bb6f7c5 (diff) | |
| parent | 7b639c0cd0676172cc8502e833f5b708f39f9a83 (diff) | |
| download | django-rest-framework-fbb21caaaa01033bbd34b0c63ab48243ffb6310e.tar.bz2 | |
Merge master
Diffstat (limited to 'rest_framework/authentication.py')
| -rw-r--r-- | rest_framework/authentication.py | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/rest_framework/authentication.py b/rest_framework/authentication.py index a75cd30c..f0702286 100644 --- a/rest_framework/authentication.py +++ b/rest_framework/authentication.py @@ -168,7 +168,7 @@ class TokenAuthentication(BaseAuthentication):      def authenticate_credentials(self, key):          try: -            token = self.model.objects.get(key=key) +            token = self.model.objects.select_related('user').get(key=key)          except self.model.DoesNotExist:              raise exceptions.AuthenticationFailed(_('Invalid token.')) | 
