mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-08 14:24:48 +03:00
Refactored _get_reverse_relationships() to use related object's pk field instead of current object's
This commit is contained in:
parent
d2f90fd6af
commit
ce98c3d921
|
@ -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
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user