Skip to content

Commit b5e0d04

Browse files
committed
Pass on instance when using polymorphic serializers
fixes #759
1 parent e3ae420 commit b5e0d04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework_json_api/serializers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -352,5 +352,5 @@ def to_internal_value(self, data):
352352
expected_types=', '.join(expected_types), received_type=received_type))
353353
serializer_class = self.get_polymorphic_serializer_for_type(received_type)
354354
self.__class__ = serializer_class
355-
return serializer_class(data, context=self.context,
355+
return serializer_class(self.instance, data, context=self.context,
356356
partial=self.partial).to_internal_value(data)

0 commit comments

Comments
 (0)