From 9436c82ceb6229546da83ea10883a2845cd362cc Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 24 Feb 2024 17:02:51 -0500 Subject: [PATCH] Alt fix --- server/models/helpers/SearchHelper.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/server/models/helpers/SearchHelper.ts b/server/models/helpers/SearchHelper.ts index 277575b13..8d47d1581 100644 --- a/server/models/helpers/SearchHelper.ts +++ b/server/models/helpers/SearchHelper.ts @@ -72,7 +72,10 @@ export default class SearchHelper { offset = 0, } = options; - const where = await this.buildWhere(team, options); + const where = await this.buildWhere(team, { + ...options, + statusFilter: [...(options.statusFilter || []), StatusFilter.Published], + }); if (options.share?.includeChildDocuments) { const sharedDocument = await options.share.$get("document"); @@ -391,12 +394,6 @@ export default class SearchHelper { }, ], }); - } else { - statusQuery.push({ - publishedAt: { - [Op.ne]: null, - }, - }); } if (options.statusFilter?.includes(StatusFilter.Archived)) {