﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26647	Post migrate signal old content type model	Jasper Maes	Simon Charette	"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."	Bug	closed	Migrations	1.10	Release blocker	fixed		Simon Charette	Ready for checkin	1	0	0	0	0	0
