Commits

and...@69d324d9-c39d-4fdc-8679-7745eae9e2c8  committed d7306bc

Fix bug with M2M defs not using the orm.

  • Participants
  • Parent commits f5dd3fc

Comments (0)

Files changed (1)

File south/management/commands/startmigration.py

                         field.name,
                         field.m2m_db_table(),
                         field.m2m_column_name()[:-3], # strip off the '_id' at the end
-                        model._meta.object_name,
+                        poss_ormise(app, model, model._meta.object_name),
                         field.m2m_reverse_name()[:-3], # strip off the '_id' at the ned
-                        field.rel.to._meta.object_name
+                        poss_ormise(app, field.rel.to, field.rel.to._meta.object_name)
                         )
                     backwards += DELETE_M2MFIELD_SNIPPET % (
                         model._meta.object_name,
                     field.name,
                     field.m2m_db_table(),
                     field.m2m_column_name()[:-3], # strip off the '_id' at the end
-                    model._meta.object_name,
+                    poss_ormise(app, model, model._meta.object_name),
                     field.m2m_reverse_name()[:-3], # strip off the '_id' at the ned
-                    field.rel.to._meta.object_name
+                    poss_ormise(app, field.rel.to, field.rel.to._meta.object_name)
                     )
                 continue