class PrimaryKeyNestedMixin(serializers.PrimaryKeyRelatedField, serializers
    .ModelSerializer):

    def to_internal_value(self, data):
        return serializers.PrimaryKeyRelatedField.to_internal_value(self, data)

def to_representation(self, data):
    return serializers.ModelSerializer.to_representation(self, data)
SerializerClass field on Serializer save from primary key