fix: Unarchiving a deleted draft adds to collection structure

This commit is contained in:
Tom Moor
2023-10-16 22:54:26 -04:00
parent d89ce1ea4d
commit d8b7d14419

View File

@@ -761,7 +761,7 @@ class Document extends ParanoidModel {
}
}
if (!this.template && collection) {
if (!this.template && this.publishedAt && collection) {
await collection.addDocumentToStructure(this, undefined, {
transaction,
});