Skip to content

Commit bb4ea99

Browse files
committed
Use cls instead of SerializerMethodResourceRelatedField
1 parent 9aa259c commit bb4ea99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework_json_api/relations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def many_init(cls, *args, **kwargs):
200200
for key in kwargs.keys():
201201
if key in ('model',) + MANY_RELATION_KWARGS:
202202
list_kwargs[key] = kwargs[key]
203-
return SerializerMethodResourceRelatedField(**list_kwargs)
203+
return cls(**list_kwargs)
204204

205205
def get_attribute(self, instance):
206206
# check for a source fn defined on the serializer instead of the model

0 commit comments

Comments
 (0)