Commits

Andrew Godwin  committed edc9ee8

Fix for not detecting dependencies of GenericRelations.

  • Participants
  • Parent commits 597bd4f

Comments (0)

Files changed (1)

File south/management/commands/startmigration.py

 
 def field_dependencies(field, last_models=None):
     depends = {}
-    if isinstance(field, (models.OneToOneField, models.ForeignKey, models.ManyToManyField)):
+    if isinstance(field, (models.OneToOneField, models.ForeignKey, models.ManyToManyField, GenericRelation)):
         depends[field.rel.to] = last_models
         depends.update(field_dependencies(field.rel.to._meta.pk, last_models))
     return depends