goinnn/django-multiselectfield

Default values ignored in admin after updating from Django 1.8 to Django 1.11

fidelleon opened this issue · 4 comments

As a matter of test, I have created a quite basic model:

CHOICES = ( ('1', 'Primero'), ('2', 'Segundo'), ('3', 'Tercero') )
opciones = MultiSelectField(choices=CHOICES, default='1,3', max_length=200, blank=True)

When used in Django 1.8, the admin interface shows options 1 and 3 as checked. Simply upgrading from Django 1.8 to Django 1.11 makes the default options ignored (no checkboxes checked).

Hi,
Did you find a solution to your problem? I'm facing it too...

Try to specify in this way:
default=('1','3')

Try to specify in this way:
default=('1','3')

.... and that made the trick :-) Thanks!

blag commented

Closing, since this is very old and outdated.