refactor: Remove unnecessary agent config check in tenant update handler

This commit is contained in:
wizardchen
2025-11-14 12:24:00 +08:00
parent bb6dff80b5
commit 6988f3af4d
-6
View File
@@ -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 {