mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 20:40:14 +03:00
Merge 3b3e3983e9
into 99382f3ccb
This commit is contained in:
commit
d591a5441f
|
@ -128,6 +128,8 @@ def _resolve_model(obj):
|
||||||
|
|
||||||
|
|
||||||
def is_authenticated(user):
|
def is_authenticated(user):
|
||||||
|
if not user:
|
||||||
|
return False
|
||||||
if django.VERSION < (1, 10):
|
if django.VERSION < (1, 10):
|
||||||
return user.is_authenticated()
|
return user.is_authenticated()
|
||||||
return user.is_authenticated
|
return user.is_authenticated
|
||||||
|
|
Loading…
Reference in New Issue
Block a user