fix: Database transaction used after committed
This commit is contained in:
@@ -568,12 +568,12 @@ class Document extends ParanoidModel {
|
||||
parentDocumentId,
|
||||
},
|
||||
});
|
||||
childDocuments.forEach(async (child) => {
|
||||
for (const child of childDocuments) {
|
||||
await archiveChildren(child.id);
|
||||
child.archivedAt = archivedAt;
|
||||
child.lastModifiedById = userId;
|
||||
await child.save(options);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
await archiveChildren(this.id);
|
||||
|
||||
Reference in New Issue
Block a user