Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Refactored _get_reverse_relationships() to use related object's pk fi…
…eld instead of current object's
  • Loading branch information
bphillips committed Dec 2, 2015
commit ce98c3d92179f65868f7c900867bc24140501f8f
2 changes: 1 addition & 1 deletion rest_framework/utils/model_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down