-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndexError: list assignment index out of range #134
Comments
I see the same error after upgrading from django 4.0.7 to 4.1.2. This is a show-stopper. |
Hello everyone, @ramonyaskal @mortenthansen : Same here 👋🏼 Hopes this will help you all. |
I have the same issue here. Python=3.8.16 And, probably, setting Happy to work on this issue if that's ok with the maintainers. |
Indeed we have : class (Field):
description = _("String (up to %(max_length)s)")
def __init__(self, *args, db_collation=None, **kwargs):
super().__init__(*args, **kwargs)
self.db_collation = db_collation
if self.max_length is not None:
self.validators.append(validators.MaxLengthValidator(self.max_length)) class MultiSelectField(models.CharField):
""" Choice values can not contain commas. """
def __init__(self, *args, **kwargs):
self.min_choices = kwargs.pop('min_choices', None)
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) We see that In all cases, Moreover, To sum up, we should not need to specify |
self.validators[0] = MaxValueMultiFieldValidator(self.max_length)
IndexError: list assignment index out of range
django==4.1.1
django-multiselectfield==0.1.12
The text was updated successfully, but these errors were encountered: