#28073: RemoveField.state_forwards() crashes with AttributeError: 'NoneType'
object
has no attribute 'is_relation'
---------------------------------+------------------------------------
Reporter: Logan Gunthorpe | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.11
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Comment (by yuanxu):
I had the same issue. In my case, I agree with testvinder. In my case,
I've delete some fields in db, and have RemoveField in migrations. In
1.10.7, It works fun and crash in 2.0.7.
I just modify the fields.py in line 145 with:
{{{
delay = old_field is None or not old_field.is_relation
}}}
It works! but I don't know if is there are other issues.
--
Ticket URL: <https://code.djangoproject.com/ticket/28073#comment:16>
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/065.3bcbe55cc6fd7007db084319b1b43507%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.