Skip to content

Commit

Permalink
Fixed IndexError with Django 4.1 (goinnn#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maffooch authored Jan 9, 2023
1 parent 07a5e44 commit 7acc7c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion multiselectfield/db/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __init__(self, *args, **kwargs):
self.max_choices = kwargs.pop('max_choices', None)
super(MultiSelectField, self).__init__(*args, **kwargs)
self.max_length = get_max_length(self.choices, self.max_length)
self.validators[0] = MaxValueMultiFieldValidator(self.max_length)
self.validators.append(MaxValueMultiFieldValidator(self.max_length))
if self.min_choices is not None:
self.validators.append(MinChoicesValidator(self.min_choices))
if self.max_choices is not None:
Expand Down

0 comments on commit 7acc7c6

Please sign in to comment.