✨(backend) add django-treebeard to allow tree structure on documents
We choose to use Django-treebeard for its quality, performance and stability. Adding tree structure to documents is as simple as inheriting from the MP_Node class.
This commit is contained in:
committed by
Anthony LC
parent
0189078917
commit
276b4f7c1b
@@ -287,7 +287,7 @@ class ServerCreateDocumentSerializer(serializers.Serializer):
|
||||
{"content": ["Could not convert content"]}
|
||||
) from err
|
||||
|
||||
document = models.Document.objects.create(
|
||||
document = models.Document.add_root(
|
||||
title=validated_data["title"],
|
||||
content=document_content,
|
||||
creator=user,
|
||||
|
||||
Reference in New Issue
Block a user