Skip to content

Commit

Permalink
fix: Correct type for CBV's multi choice field #4497
Browse files Browse the repository at this point in the history
  • Loading branch information
mauromsl authored and StephDriver committed Nov 28, 2024
1 parent a3e45c0 commit 24c5e6e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/core/forms/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,6 @@ def __init__(self, *args, **kwargs):
self.id = 'facet_form'
self.queryset = kwargs.pop('queryset')
self.facets = kwargs.pop('facets')
self.fields = {}

super().__init__(*args, **kwargs)

Expand All @@ -619,7 +618,7 @@ def __init__(self, *args, **kwargs):
choices.append((each.pk, label_with_count))

choices = sorted(choices, key=lambda x: x[1])
self.fields[facet_key] = forms.ChoiceField(
self.fields[facet_key] = forms.MultipleChoiceField(
widget=forms.widgets.CheckboxSelectMultiple,
choices=choices,
required=False,
Expand Down

0 comments on commit 24c5e6e

Please sign in to comment.