Merge pull request #150 from nagisa77/codex/fix-test-case-for-searchservice

Fix SearchService NPE in tests
This commit is contained in:
Tim
2025-07-10 00:03:51 +08:00
committed by GitHub

View File

@@ -67,7 +67,7 @@ public class SearchService {
"post",
p.getId(),
p.getTitle(),
p.getCategory().getName(),
p.getCategory() != null ? p.getCategory().getName() : null,
extractSnippet(p.getContent(), keyword, false),
null
)),
@@ -76,7 +76,7 @@ public class SearchService {
"post_title",
p.getId(),
p.getTitle(),
p.getCategory().getName(),
p.getCategory() != null ? p.getCategory().getName() : null,
extractSnippet(p.getContent(), keyword, true),
null
))