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 参数无效的问题
```
pull/7351/head^2
困困鱼 2025-04-18 18:38:27 +08:00 committed by GitHub
parent e8867a048f
commit 9225668f73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 4 deletions

View File

@ -325,10 +325,6 @@ public class PostFinderImpl implements PostFinder {
builder.andQuery(equal("spec.tags", tagName));
hasQuery = true;
}
if (StringUtils.isNotBlank(categoryName)) {
builder.andQuery(in("spec.categories", categoryName));
hasQuery = true;
}
// Exclude hidden posts when no query
if (!hasQuery) {
builder.fieldQuery(notHiddenPostQuery());