Opened 10 years ago
Last modified 10 years ago
#24563 closed Bug
Migration for M2M Field fails with FieldDoesNotExist when removing null=True from model — at Initial Version
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
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"