perf: Document.state still queried in documents.search endpoint

This commit is contained in:
Tom Moor
2022-03-10 09:17:29 -08:00
parent fd9ef3ab22
commit f36e18e3a6

View File

@@ -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],
},