fix: Filter drafts by default, related #6537
This commit is contained in:
@@ -391,6 +391,12 @@ export default class SearchHelper {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
statusQuery.push({
|
||||||
|
publishedAt: {
|
||||||
|
[Op.ne]: null,
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.statusFilter?.includes(StatusFilter.Archived)) {
|
if (options.statusFilter?.includes(StatusFilter.Archived)) {
|
||||||
@@ -401,7 +407,7 @@ export default class SearchHelper {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.statusFilter?.length) {
|
if (statusQuery.length) {
|
||||||
where[Op.and].push({
|
where[Op.and].push({
|
||||||
[Op.or]: statusQuery,
|
[Op.or]: statusQuery,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user