Skip to content

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

refactor: Remove unnecessary agent config check in tenant update handler

wizardchen6988f3af4dc8
diff --git a/internal/handler/tenant.go b/internal/handler/tenant.go
index 2aec97db4..2d0dccdc5 100644
--- a/internal/handler/tenant.go
+++ b/internal/handler/tenant.go
@@ -354,12 +354,6 @@ func (h *TenantHandler) updateTenantAgentConfigInternal(c *gin.Context) {
// Get existing tenant
tenant := ctx.Value(types.TenantInfoContextKey).(*types.Tenant)
- if tenant.AgentConfig == nil {
- logger.Error(ctx, "Tenant has no agent config")
- c.Error(errors.NewBadRequestError("Tenant has no agent config"))
- return
- }
-
// Update agent configuration
useCustomPrompt := tenant.AgentConfig.UseCustomSystemPrompt
if req.UseCustomPrompt != nil {