Skip to content

Commit b705f11

Browse files
miguelgrinberggithub-actions[bot]
authored andcommitted
Fixed use of dictionaries as values in Terms query (#1921)
Fixes #1920 (cherry picked from commit fb18f38)
1 parent ee1dc8f commit b705f11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/templates/query.py.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ EMPTY_QUERY = MatchAll()
365365
{% elif k.name == "Terms" %}
366366
def _setattr(self, name: str, value: Any) -> None:
367367
# here we convert any iterables that are not strings to lists
368-
if hasattr(value, "__iter__") and not isinstance(value, (str, list)):
368+
if hasattr(value, "__iter__") and not isinstance(value, (str, list, dict)):
369369
value = list(value)
370370
super()._setattr(name, value)
371371

0 commit comments

Comments
 (0)