From 2572c07cc64177e985b453d0f0b819e85fe080cc Mon Sep 17 00:00:00 2001 From: Loic Bistuer Date: Sun, 6 Jul 2014 13:57:23 +0700 Subject: Fixed #22906 -- Added a more helpful repr to migrations' ModelState. Thanks Collin Anderson for the report and original patch. --- django/db/migrations/state.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'django') diff --git a/django/db/migrations/state.py b/django/db/migrations/state.py index 69bfbb2ab2..d27e5013b7 100644 --- a/django/db/migrations/state.py +++ b/django/db/migrations/state.py @@ -300,6 +300,9 @@ class ModelState(object): return field raise ValueError("No field called %s on model %s" % (name, self.name)) + def __repr__(self): + return "" % (self.app_label, self.name) + def __eq__(self, other): return ( (self.app_label == other.app_label) and -- cgit v1.3