Skip to content

Commit

Permalink
fix q node child type, work with the django-advanced-filters app
Browse files Browse the repository at this point in the history
  • Loading branch information
tmszi authored and vdboor committed Nov 18, 2021
1 parent 5191989 commit ad7bff9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion polymorphic/query_translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def tree_node_correct_field_specs(my_model, node):
for i in range(len(node.children)):
child = node.children[i]

if type(child) == tuple:
if type(child) == tuple or type(child) == list:
# this Q object child is a tuple => a kwarg like Q( instance_of=ModelB )
key, val = child
new_expr = _translate_polymorphic_filter_definition(
Expand Down

0 comments on commit ad7bff9

Please sign in to comment.