Skip to content

Commit

Permalink
Check that entity is set
Browse files Browse the repository at this point in the history
  • Loading branch information
RonRademaker authored Aug 16, 2023
1 parent 25817cc commit 3ea91ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sqlalchemy_filters/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def get_query_models(query):
:returns:
A dictionary with all the models included in the query.
"""
models = [col_desc['entity'] for col_desc in query.column_descriptions]
models = [col_desc['entity'] for col_desc in query.column_descriptions if col_desc['entity']]
models.extend(mapper.class_ for mapper in query._join_entities)

# account also query.select_from entities
Expand Down

0 comments on commit 3ea91ce

Please sign in to comment.