Skip to content

Commit da15f6f

Browse files
committed
Correct type for items in relationship
Type field of related item in relationship should be type of the related item not the current type.
1 parent 0903f2e commit da15f6f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sqlalchemy_jsonapi/serializer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ def _render_full_resource(self, instance, include, fields):
366366
if key in local_fields:
367367
to_ret['relationships'][key]['data'].append({
368368
'id': item.id,
369-
'type': api_type
369+
'type': item.__jsonapi_type__
370370
})
371371

372372
if key in include.keys():

0 commit comments

Comments
 (0)