Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix decision_id can be null (#21424)

Wang Qi6c87643a0ca6
diff --git a/internal/service/chat.go b/internal/service/chat.go
index 7d25cd538c..ba21771946 100644
--- a/internal/service/chat.go
+++ b/internal/service/chat.go
@@ -894,7 +894,7 @@ func (s *ChatService) updateChatREST(ctx context.Context, userID, chatID string,
}
if value, ok := req["decision_id"]; ok {
- decisionID := fmt.Sprint(value)
+ decisionID := stringFromValue(value)
if decisionID == "" {
// Clearing the override is meaningful: it falls back to the tenant
// default rather than disabling the gate for this chat.