#26647: Post migrate signal old content type model
-------------------------------+--------------------
     Reporter:  jlemaes        |      Owner:  nobody
         Type:  Bug            |     Status:  new
    Component:  Uncategorized  |    Version:  1.10
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 Since the post migrate signal has the apps argument and the
 update_contenttypes and create_permissions listeners use this apps
 argument to detect the ContentType model, there can be a bug when
 unapplying a migration and then applying it again. The listeners will use
 an old model with ContentType.name still present because this in the apps
 of the state that the migration executor returned. [[BR]][[BR]]
 I made a [https://github.com/jlemaes/django_post_migrate testproject] were
 the error is replicated.
 The tests for the first app will fail, but not for the second app. I
 tracked this down to the migration executor were in the crashing app the
 migrations are in front of the migration that removes the ContentType.name
 field in the full_plan variable, so the executor returns a state not
 including this ContentType model change.
 [[BR]]
 If someone can push me in the right direction I am willing to make a patch
 for this issue.

--
Ticket URL: <https://code.djangoproject.com/ticket/26647>
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/050.96e3ffd6d318ac378d4fe2f71c73b554%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to