mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-02-11 17:10:37 +03:00
Convert multiple choice fields to list
This commit is contained in:
parent
32667b5407
commit
f29c75eec5
|
@ -86,8 +86,11 @@ def get_filtering_args_from_filterset(filterset_class, type):
|
|||
form_field = form_field or filter_field.field
|
||||
field_type = convert_form_field(form_field).get_type()
|
||||
|
||||
if isinstance(filter_field, ListFilter) or isinstance(
|
||||
filter_field, RangeFilter
|
||||
if (
|
||||
isinstance(filter_field, ListFilter)
|
||||
or isinstance(filter_field, RangeFilter)
|
||||
or isinstance(form_field, forms.ModelMultipleChoiceField)
|
||||
or isinstance(form_field, GlobalIDMultipleChoiceField)
|
||||
):
|
||||
# Replace InFilter/RangeFilter filters (`in`, `range`) argument type to be a list of
|
||||
# the same type as the field. See comments in `replace_csv_filters` method for more details.
|
||||
|
|
Loading…
Reference in New Issue
Block a user