Skip to content

Commit 446013c

Browse files
authored
Update authorization.rst
1 parent 84d82f8 commit 446013c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

docs/authorization.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,8 @@ define a resolve method for that field and return the desired queryset.
6464
all_posts = DjangoFilterConnectionField(PostNode)
6565
6666
def resolve_all_posts(self, info):
67-
post = Post.objects.filter(published=True)
68-
if post is not None:
69-
return post
70-
else:
71-
return None
67+
return Post.objects.filter(published=True)
68+
7269
7370
User-based Queryset Filtering
7471
-----------------------------

0 commit comments

Comments
 (0)