#24513: "... has no field named None" with M2MField when migrating
-------------------------------+-----------------------------
     Reporter:  Kondou-ger     |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Migrations     |    Version:  1.8rc1
     Severity:  Normal         |   Keywords:  migrations, bug
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+-----------------------------
 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 <[email protected]>
 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.

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

Reply via email to