Closed austin-schick closed 2 months ago
There is some discussion of this change here. I think this can be worked around by manually setting max_length
to be the largest field as my example shows here.
Django <4.1 and Python < 3 support got dropped in #148 so you might still need to update.
Thanks, closing in favor of a new issue about the outdated README instead :)
https://github.com/goinnn/django-multiselectfield/issues/159
The README indicates that django-multiselectfield supports Django 2.0+. If that is no longer true and I should fix this bug by upgrading Django, that's understandable!
Report
After upgrading to django-multiselectfield 0.1.13, when modifying objects via the admin page changeform, I'm seeing an exception in
django/core/validators.py
.I think the error was introduced in this commit: https://github.com/goinnn/django-multiselectfield/commit/422fc71b4c772feb3483aec5d60573eedf960482:
In Django 3.2.25,
CharField
unconditionally adds a validator when it's initialized:That
MaxLengthValidator
doesn't run successfully on aMultiSelectField
, so I get the error below.Thanks for taking a look at this, and thanks for keeping the library up to date!
Stack Trace