Andrew Godwin  committed 45bbe95

Proper fix for #721

  • Participants
  • Parent commits 186e001

Comments (0)

Files changed (2)

File south/migration/

 def to_apply(forwards, done):
-    return [m for m in forwards if not is_done(m, done)]
+    return [m for m in forwards if m not in done]
 def to_unapply(backwards, done):
-    return [m for m in backwards if is_done(m, done)]
-def is_done(migration, done):
-    """
-    Returns True if migration is done, i.e. applied.
-    Otherwise returns False.
-    Compares migrations by name because different instances of the 
-    same migration class do not compare as equal.
-    """
-    return in [ for m in done]
+    return [m for m in backwards if m in done]
 def problems(pending, done):
     last = None

File south/migration/

     def __repr__(self):
         return u'<Migration: %s>' % unicode(self)
+    def __eq__(self, other):
+        return self.app_label() == other.app_label() and ==
     def app_label(self):
         return self.migrations.app_label()