1. Luke Plant
  2. south


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

Fix for #123: AssertionErrors are another valid way for fields to fail.

  • Participants
  • Parent commits ceaeb73
  • Branches default

Comments (0)

Files changed (1)

File south/orm.py

View file
                 field = self.eval_in_context(code, app)
-            except (NameError, AttributeError):
+            except (NameError, AttributeError, AssertionError):
                 # It might rely on other models being around. Add it to the
                 # model for the second pass.
                 failed_fields[fname] = code
                 for fname, code in model._failed_fields.items():
                         field = self.eval_in_context(code, app)
-                    except (NameError, AttributeError), e:
+                    except (NameError, AttributeError, AssertionError), e:
                         # It's failed again. Complain.
                         raise ValueError("Cannot successfully create field '%s' for model '%s': %s." % (
                             fname, modelname, e