Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#24563 closed Bug (duplicate)

Migration for M2M Field fails with FieldDoesNotExist when removing null=True from model — at Version 2

Reported by: Ronny Vedrilla Owned by: nobody
Component: Migrations Version: 1.8
Severity: Normal Keywords: migrations, many2many, nullable
Cc: me@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

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"

Change History (2)

comment:1 by Andriy Sokolovskiy, 9 years ago

Cc: me@… added

Can not reproduce this locally.
Please provide a test project, where this error will exists.

comment:2 by Tim Graham, 9 years ago

Description: modified (diff)
Resolution: needsinfo
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top