#24563: Migration for M2M Field fails with FieldDoesNotExist when removing
null=True from model
-------------------------------------+-------------------------------------
     Reporter:  GitRon               |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Migrations           |                  Version:  1.8
     Severity:  Normal               |               Resolution:  needsinfo
     Keywords:  migrations,          |             Triage Stage:
  many2many, nullable                |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by timgraham):

 * status:  new => closed
 * resolution:   => needsinfo


Old description:

> I removed the null=True as suggested in django 1.8 warnings from my M2M
> field in the model.
>
> django migrations created the following:
>
> class Migration(migrations.Migration):
>
> [...]
> operations = [
> migrations.AlterField(model_name='project', name='my_field',
> field=models.ManyToManyField(related_name='in_charge_projects',
> verbose_name='label', to='account.Employee', blank=True),
> ),
> [...]
> ]
>
> I get the following error:
>
> "django.core.exceptions.FieldDoesNotExist: Project_my_field has no field
> named None"

New description:

 I removed the null=True as suggested in django 1.8 warnings from my M2M
 field in the model.

 django migrations created the following:
 {{{
 class Migration(migrations.Migration):

 [...]
     operations = [
         migrations.AlterField(model_name='project', name='my_field',
 field=models.ManyToManyField(related_name='in_charge_projects',
 verbose_name='label', to='account.Employee', blank=True),
         ),
 [...]
 ]
 }}}
 I get the following error:

 "django.core.exceptions.FieldDoesNotExist: Project_my_field has no field
 named None"

--

--
Ticket URL: <https://code.djangoproject.com/ticket/24563#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.20782b6caa595bc73543b389a485a98f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to