diff --git a/server/models/Document.ts b/server/models/Document.ts index cca01e9f5..28b877fcd 100644 --- a/server/models/Document.ts +++ b/server/models/Document.ts @@ -610,7 +610,8 @@ class Document extends ParanoidModel { // Final query to get associated document data const documents = await this.scope([ - "defaultScope", + "withoutState", + "withDrafts", { method: ["withViews", user.id], },