#24563: Migration for M2M Field fails with FieldDoesNotExist when removing
null=True from model
-------------------------------------+-------------------------------------
Reporter: GitRon | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.8
Severity: Normal | Resolution:
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
-------------------------------------+-------------------------------------
Comment (by codefisher):
Just looking noticed at
https://docs.djangoproject.com/en/1.8/ref/models/meta/ there was a change
to the `get_field()` method in 1.8. Maybe create_model is still assuming
the old functionality of `get_field()` here? Maybe what is needed is
something like this:
{{{
columns = [model._meta.get_field(field).column for field in fields if not
field.many_to_many]
}}}
I have not tested, but am really just guessing at what looks right from
the docs.
--
Ticket URL: <https://code.djangoproject.com/ticket/24563#comment:4>
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.39b4bf7e8af49350a9d0c262f246eba4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.