refactor: Remove unnecessary agent config check in tenant update handler
This commit is contained in:
@@ -354,12 +354,6 @@ func (h *TenantHandler) updateTenantAgentConfigInternal(c *gin.Context) {
|
|||||||
|
|
||||||
// Get existing tenant
|
// Get existing tenant
|
||||||
tenant := ctx.Value(types.TenantInfoContextKey).(*types.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
|
// Update agent configuration
|
||||||
useCustomPrompt := tenant.AgentConfig.UseCustomSystemPrompt
|
useCustomPrompt := tenant.AgentConfig.UseCustomSystemPrompt
|
||||||
if req.UseCustomPrompt != nil {
|
if req.UseCustomPrompt != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user