mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-27 03:53:56 +03:00
Merge pull request #127 from miracle2k/patch-1
Allow empty list in SQLAlchemyConnectionField.
This commit is contained in:
commit
b5f343b3a3
|
@ -17,7 +17,7 @@ class SQLAlchemyConnectionField(ConnectionField):
|
|||
return self.type._meta.model
|
||||
|
||||
def get_query(self, resolved_query, args, info):
|
||||
return resolved_query or get_query(self.model, info)
|
||||
return resolved_query if resolved_query is not None else get_query(self.model, info)
|
||||
|
||||
def from_list(self, connection_type, resolved, args, info):
|
||||
query = self.get_query(resolved, args, info)
|
||||
|
|
Loading…
Reference in New Issue
Block a user