Only evaluate reverse M2Ms in get_reverse_fields

This commit is contained in:
Jacob Foster 2017-05-22 16:43:20 -05:00
parent afec960e4d
commit 7a765537e9

View File

@ -33,7 +33,7 @@ def get_reverse_fields(model):
yield (name, new_related)
elif isinstance(related, models.ManyToOneRel):
yield (name, related)
elif isinstance(related, models.ManyToManyRel) and not related.symmetrical:
elif isinstance(related, models.ManyToManyRel) and attr.reverse and not related.symmetrical:
yield (name, related)