is_authenticated is bool not callable.

This commit is contained in:
A C SREEDHAR REDDY 2019-08-16 03:21:24 +05:30 committed by GitHub
parent d5e71bc9be
commit 69f2307d3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,7 +84,7 @@ with the context argument.
def resolve_my_posts(self, info):
# 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()
else:
return Post.objects.filter(owner=info.context.user)