Skip to content

Example fails initial makemigrations #140

Open
@dwadler

Description

@dwadler

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions