Skip to content

Commit

Permalink
Merge pull request #10 from Harborn-digital/bug-fix-too-many-values-u…
Browse files Browse the repository at this point in the history
…npack

Fix too many values to unpack error
  • Loading branch information
robderijk authored Apr 4, 2022
2 parents f02b9dd + 9378037 commit 6e3fcd2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sqlalchemy_filters/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def get_named_models(self, model):
operator = self.filter_spec['op'] if 'op' in self.filter_spec else None

models = get_relationship_models(model, field)
return list(), models if should_outer_join_relationship(operator) else models, list()
return (list(), models) if should_outer_join_relationship(operator) else (models, list())

def format_for_sqlalchemy(self, query, default_model):
filter_spec = self.filter_spec
Expand Down
2 changes: 1 addition & 1 deletion sqlalchemy_filters/sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_named_models(self, model):

models = get_relationship_models(model, field)

return list(), models if should_outer_join_relationship(operator) else models, list()
return (list(), models) if should_outer_join_relationship(operator) else (models, list())

def format_for_sqlalchemy(self, query, default_model):
sort_spec = self.sort_spec
Expand Down

0 comments on commit 6e3fcd2

Please sign in to comment.