mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-25 02:53:58 +03:00
Don't hit db to access user_id in TokenProxy (#7852)
This commit is contained in:
parent
67ebdd32cd
commit
b25ac6c5e3
|
@ -46,7 +46,7 @@ class TokenProxy(Token):
|
|||
"""
|
||||
@property
|
||||
def pk(self):
|
||||
return self.user.pk
|
||||
return self.user_id
|
||||
|
||||
class Meta:
|
||||
proxy = 'rest_framework.authtoken' in settings.INSTALLED_APPS
|
||||
|
|
Loading…
Reference in New Issue
Block a user