From 6af8d6f4b2ed25948a4f1fa82c848fc1d24b6353 Mon Sep 17 00:00:00 2001 From: webitel Date: Wed, 27 May 2026 17:53:41 +0300 Subject: [PATCH] WTEL-9598: Require team field on agent validation --- model/cc_agent.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/model/cc_agent.go b/model/cc_agent.go index cce99f60..ecfb0b46 100644 --- a/model/cc_agent.go +++ b/model/cc_agent.go @@ -396,6 +396,9 @@ func (a *Agent) IsValid() AppError { if a.ProgressiveCount < 1 { return NewBadRequestError("model.Agent.valid.ProgressiveCount", "The call count should be more or equal 1") } + if a.Team == nil || a.Team.Id == 0 { + return NewBadRequestError("model.Agent.valid.Team", "Team is required") + } return nil //TODO }