From 386166970c506b5f7b70f63bfb86d1ea64a980cf Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Thu, 12 Jun 2014 11:12:07 -0700 Subject: [PATCH] Fix test breakage from previous state fix --- django/db/migrations/state.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/django/db/migrations/state.py b/django/db/migrations/state.py index 750383c39f..b8c614d1a1 100644 --- a/django/db/migrations/state.py +++ b/django/db/migrations/state.py @@ -204,6 +204,12 @@ class ModelState(object): options[name] = set(normalize_together(it)) else: options[name] = model._meta.original_attrs[name] + # If we're ignoring relationships, remove all field-listing model + # options (that option basically just means "make a stub model") + if exclude_rels: + for key in ["unique_together", "index_together", "order_with_respect_to"]: + if key in options: + del options[key] def flatten_bases(model): bases = []