(provider string, models []dto.AgentAccountModel, modelID string)
| 1441 | } |
| 1442 | |
| 1443 | func requireAgentAccountModelForProvider(provider string, models []dto.AgentAccountModel, modelID string) (dto.AgentAccountModel, error) { |
| 1444 | selectedAccountModel, ok := findAgentAccountModelForProvider(provider, models, modelID) |
| 1445 | if !ok { |
| 1446 | return dto.AgentAccountModel{}, buserr.New("ErrAgentModelNotInAccount") |
| 1447 | } |
| 1448 | return selectedAccountModel, nil |
| 1449 | } |
| 1450 | |
| 1451 | func ensureAccountModelsNotBound(account *model.AgentAccount, models []dto.AgentAccountModel) error { |
| 1452 | if account == nil || account.ID == 0 { |
no test coverage detected