diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2014-06-12 11:12:07 -0700 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2014-06-12 11:12:33 -0700 |
| commit | 49d4ace2d2798f1239b8d9d773c88b1a9848b34f (patch) | |
| tree | c25b8376633182ef50a140a42776e92010910f46 | |
| parent | 83e96ee99b6cd8ce1863dcca24dfbf4a8d6b5429 (diff) | |
[1.7.x] Fix test breakage from previous state fix
| -rw-r--r-- | django/db/migrations/state.py | 6 |
1 files changed, 6 insertions, 0 deletions
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 = [] |
