﻿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
24513	"""... has no field named None"" with M2MField when migrating"	Christopher Schäpers	nobody	"In Django 1.8c1 migrations from scratch don't work for me anymore, this effectively prevents testing.

(When you see project I'm talking about an app, btw)

See file traceback.txt for a test-call and a backtrace.

See file 0011_auto_20140914_2032.py for the migration that failed.

And see file user_model.py for the model that should be migrated.

---

I can't provide much code sadly. I tried to simplify my big project, but I can't get it done without disclosing half of my product (or it would take me days to do so …).

Instead I did a git-bisect to get the commit that makes my migrations fail:
{{{
(testenv)kondou:django/ (4e9ecfe) $ git bisect good
a1ba4627931591b80afa46e38e261f354151d91a is the first bad commit
commit a1ba4627931591b80afa46e38e261f354151d91a
Author: Markus Holtermann <info@markusholtermann.eu>
Date:   Mon Feb 9 01:11:25 2015 +0100

    [1.8.x] Fixed #24225, #24264, #24282 -- Rewrote model reloading in migration project state
    
    Instead of naively reloading only directly related models (FK, O2O, M2M
    relationship) the project state needs to reload their relations as well
    as the model changes as well. Furthermore inheriting models (and super
    models) need to be reloaded in order to keep inherited fields in sync.
    
    To prevent endless recursive calls an iterative approach is taken.
    
    Backport of b29f3b51204d53c1c8745966476543d068c173a2 from master

:040000 040000 2faa54b906f309ddb353a73abbef7db950b18d1c 2eb05be062be72e8a8f4d54961fbe3ec96d0edf1 M      django
}}}

Doing a git revert a1ba4627931591b80afa46e38e261f354151d91a on 1.8c1 tag indeed fixes this problem for me."	Bug	closed	Migrations	1.8	Release blocker	fixed	migrations, bug	Florian Apolloner	Ready for checkin	1	0	0	0	0	0
