From 23ff98888e5c183b299f29ea651c9b545ef02807 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Wed, 9 Jul 2014 23:57:35 -0700 Subject: [PATCH] [1.7.x] Fixed #22922: Better error message for InvalidBasesError. --- django/db/migrations/state.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/migrations/state.py b/django/db/migrations/state.py index d27e5013b7..ab1c39f8ee 100644 --- a/django/db/migrations/state.py +++ b/django/db/migrations/state.py @@ -68,7 +68,7 @@ class ProjectState(object): except InvalidBasesError: new_unrendered_models.append(model) if len(new_unrendered_models) == len(unrendered_models): - raise InvalidBasesError("Cannot resolve bases for %r" % new_unrendered_models) + raise InvalidBasesError("Cannot resolve bases for %r\nThis can happen if you are inheriting models from an app with migrations (e.g. contrib.auth)\n in an app with no migrations; see https://docs.djangoproject.com/en/1.7/topics/migrations/#dependencies for more" % new_unrendered_models) unrendered_models = new_unrendered_models # make sure apps has no dangling references if self.apps._pending_lookups: