We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf7693b commit 24aaabdCopy full SHA for 24aaabd
rest_framework_json_api/utils.py
@@ -216,7 +216,7 @@ def extract_relationships(fields, resource):
216
if isinstance(field, HyperlinkedRouterField):
217
# special case for HyperlinkedRouterField
218
relation_data = list()
219
- relation_type = get_related_resource_type(getattr(field.parent.instance, field_name))
+ relation_type = get_related_resource_type(field)
220
parent_instance = field.parent.instance
221
related = getattr(parent_instance, field_name).all() if hasattr(parent_instance, field_name) else list()
222
for relation in related:
0 commit comments