mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-01-31 11:48:38 +03:00
is_authenticated is bool not callable. (#749)
This commit is contained in:
parent
d5e71bc9be
commit
9d245287a4
|
@ -84,7 +84,7 @@ with the context argument.
|
||||||
|
|
||||||
def resolve_my_posts(self, info):
|
def resolve_my_posts(self, info):
|
||||||
# context will reference to the Django request
|
# context will reference to the Django request
|
||||||
if not info.context.user.is_authenticated():
|
if not info.context.user.is_authenticated:
|
||||||
return Post.objects.none()
|
return Post.objects.none()
|
||||||
else:
|
else:
|
||||||
return Post.objects.filter(owner=info.context.user)
|
return Post.objects.filter(owner=info.context.user)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user