[1.7.x] Fix test breakage from previous state fix

This commit is contained in:
Andrew Godwin 2014-06-12 11:12:07 -07:00
parent 83e96ee99b
commit 49d4ace2d2
1 changed files with 6 additions and 0 deletions

View File

@ -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 = []