mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-23 07:00:56 +03:00
Return an empty queryset instead of an empty list
This commit is contained in:
parent
72411e559f
commit
fa9b7922a1
|
@ -75,7 +75,7 @@ class Query(ObjectType):
|
|||
def resolve_my_posts(self, args, context, info):
|
||||
# context will reference to the Django request
|
||||
if not context.user.is_authenticated():
|
||||
return []
|
||||
return Post.objects.none()
|
||||
else:
|
||||
return Post.objects.filter(owner=context.user)
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue
Block a user