is_authenticated is bool not callable. (#749)

This commit is contained in:
A C SREEDHAR REDDY 2019-08-16 19:03:59 +05:30 committed by Jonathan Kim
parent d5e71bc9be
commit 9d245287a4

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)