Permalink
Browse files

Fix test breakage from previous state fix

  • Loading branch information...
1 parent 7b17350 commit 386166970c506b5f7b70f63bfb86d1ea64a980cf @andrewgodwin andrewgodwin committed Jun 12, 2014
Showing with 6 additions and 0 deletions.
  1. +6 −0 django/db/migrations/state.py
@@ -204,6 +204,12 @@ def from_model(cls, model, exclude_rels=False):
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 = []

0 comments on commit 3861669

Please sign in to comment.