Skip to content

Commit 6928b3f

Browse files
committed
Convert multiple choice fields to list
1 parent 3077610 commit 6928b3f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

graphene_django/filter/utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,11 @@ def get_filtering_args_from_filterset(filterset_class, type):
8686
form_field = form_field or filter_field.field
8787
field_type = convert_form_field(form_field).get_type()
8888

89-
if isinstance(filter_field, ListFilter) or isinstance(
90-
filter_field, RangeFilter
89+
if (
90+
isinstance(filter_field, ListFilter)
91+
or isinstance(filter_field, RangeFilter)
92+
or isinstance(form_field, forms.ModelMultipleChoiceField)
93+
or isinstance(form_field, GlobalIDMultipleChoiceField)
9194
):
9295
# Replace InFilter/RangeFilter filters (`in`, `range`) argument type to be a list of
9396
# the same type as the field. See comments in `replace_csv_filters` method for more details.

0 commit comments

Comments
 (0)