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 }