Skip to content

Commit 9225668

Browse files
fix: resolve issue with categoryName parameter not working in postFinder.list() (#7350)
#### What type of PR is this? /kind bug #### What this PR does / why we need it: 修复 postFinder.list() 传参 categoryName 查询不到子类文章 #### Which issue(s) this PR fixes: Fixes #7296 #### Does this PR introduce a user-facing change? ```release-note 修复 postFinder.list() 的 categoryName 参数无效的问题 ```
1 parent e8867a0 commit 9225668

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

application/src/main/java/run/halo/app/theme/finders/impl/PostFinderImpl.java

-4
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,6 @@ public ListOptions toListOptions() {
325325
builder.andQuery(equal("spec.tags", tagName));
326326
hasQuery = true;
327327
}
328-
if (StringUtils.isNotBlank(categoryName)) {
329-
builder.andQuery(in("spec.categories", categoryName));
330-
hasQuery = true;
331-
}
332328
// Exclude hidden posts when no query
333329
if (!hasQuery) {
334330
builder.fieldQuery(notHiddenPostQuery());

0 commit comments

Comments
 (0)