Example fails initial makemigrations
dwadler opened this issue · 1 comments
I'm using Python 3.10 with Django 4.1.2 on Windows 10.
When going to the application folder and running
python manage.py makemigrations
I get the following errors:
File "E:\dwacode\django\django-multiselectfield-master\example\app\models.py", line 66, in
class Book(models.Model):
File "E:\dwacode\django\django-multiselectfield-master\example\app\models.py", line 68, in Book
categories = MultiSelectField(choices=CATEGORY_CHOICES,
File "d:\python10\lib\site-packages\multiselectfield\db\fields.py", line 72, in init
self.validators[0] = MaxValueMultiFieldValidator(self.max_length)
IndexError: list assignment index out of range
I just noticed this is the same as issue #131.
The workaround to set max_length didn't work for me. I always seem to get the error "app.Book.tags: (fields.E009) 'max_length' is too small to fit the longest value in 'choices' (11 characters)." What is "max_length"?
It would be nice when there are keyword options to document what the options are.
Please install directly from GitHub (pip install git+https://github.com/goinnn/django-multiselectfield.git@master
) and try again. This was fixed a few days ago.