This commit is contained in:
Tom Moor
2024-02-24 17:02:51 -05:00
parent 0484941158
commit 9436c82ceb

View File

@@ -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)) {