Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

fix: 修复标签ID处理逻辑,正确处理空字符串与UntaggedTagID的判断条件

wizardchen0e5370c7c497
diff --git a/internal/application/repository/chunk.go b/internal/application/repository/chunk.go
index 1e9a8ab1f..11b60ee28 100644
--- a/internal/application/repository/chunk.go
+++ b/internal/application/repository/chunk.go
@@ -652,7 +652,7 @@ func (r *chunkRepository) UpdateChunkFieldsByTagID(
// Handle newTagID update (__untagged__ is stored as empty string)
if newTagID != nil {
- if *newTagID == types.UntaggedTagID {
+ if *newTagID == types.UntaggedTagID || *newTagID == "" {
updates["tag_id"] = ""
} else {
updates["tag_id"] = *newTagID