fix: Prevent duplicate documents in collection structure
This commit is contained in:
@@ -647,6 +647,10 @@ class Collection extends ParanoidModel {
|
||||
this.documentStructure = [];
|
||||
}
|
||||
|
||||
if (this.getDocumentTree(document.id)) {
|
||||
return this;
|
||||
}
|
||||
|
||||
// If moving existing document with children, use existing structure
|
||||
const documentJson = {
|
||||
...(await document.toNavigationNode(options)),
|
||||
|
||||
Reference in New Issue
Block a user