From d8b7d14419bc14cfe94991518bda15c814a93a30 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Mon, 16 Oct 2023 22:54:26 -0400 Subject: [PATCH] fix: Unarchiving a deleted draft adds to collection structure --- server/models/Document.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/models/Document.ts b/server/models/Document.ts index 3576bcffc..df664d7f9 100644 --- a/server/models/Document.ts +++ b/server/models/Document.ts @@ -761,7 +761,7 @@ class Document extends ParanoidModel { } } - if (!this.template && collection) { + if (!this.template && this.publishedAt && collection) { await collection.addDocumentToStructure(this, undefined, { transaction, });