Fix the error in API Create a child node (a Component) with license information.
Fix the error in API Create a child node (a Component) with template_from specified in attributes. This support is only for CLI, not yet for the website UI.
API Create a child node (a Component) with license information
Add parser_classes = (JSONAPIMultipleRelationshipsParser, JSONAPIMultipleRelationshipsParserForRegularJSON,) into the NodeChildrenList class.
The relationships object in the request body will be parsed by the JSONAPIMultipleRelationshipsParserForRegularJSON class.
API Create a child node (a Component) with template_from specified
Set the node._parent = validated_data.pop('parent', None) right after template_node.use_as_template is called in api.nodes.serializers.NodeSerializer.create method
Purpose
Changes
parser_classes = (JSONAPIMultipleRelationshipsParser, JSONAPIMultipleRelationshipsParserForRegularJSON,)
into theNodeChildrenList
class. Therelationships
object in the request body will be parsed by theJSONAPIMultipleRelationshipsParserForRegularJSON
class.node._parent = validated_data.pop('parent', None)
right aftertemplate_node.use_as_template
is called inapi.nodes.serializers.NodeSerializer.create
methodQA Notes
Documentation
Side Effects
Ticket