Refactored _get_reverse_relationships() to use related object's pk field instead of current object's

This commit is contained in:
bphillips 2015-12-02 13:37:23 -05:00
parent d2f90fd6af
commit ce98c3d921

View File

@ -145,7 +145,7 @@ def _get_reverse_relationships(opts):
model_field=None,
related_model=related,
to_many=relation.field.rel.multiple,
to_field=_get_to_field(relation.field),
to_field=_get_to_field(relation.field.model._meta.pk),
has_through_model=False
)