Add remaings consts for ActionProfile in utils

This commit is contained in:
TeoV
2020-12-04 17:30:47 +02:00
committed by Dan Christian Bogos
parent a3992bb85a
commit 43b5e1f97e
7 changed files with 300 additions and 102 deletions

View File

@@ -3377,7 +3377,7 @@ func (tps ActionProfileMdls) AsTPActionProfile() (result []*utils.TPActionProfil
result[i].FilterIDs = append(result[i].FilterIDs, filterID)
}
for accountID := range accountIDsMap[tntID] {
result[i].FilterIDs = append(result[i].FilterIDs, accountID)
result[i].AccountIDs = append(result[i].AccountIDs, accountID)
}
i++
}
@@ -3494,6 +3494,7 @@ func ActionProfileToAPI(ap *ActionProfile) (tpAp *utils.TPActionProfile) {
tpAp = &utils.TPActionProfile{
Tenant: ap.Tenant,
ID: ap.ID,
FilterIDs: make([]string, len(tpAp.FilterIDs)),
Weight: ap.Weight,
Schedule: ap.Schedule,
AccountIDs: ap.AccountIDs.AsSlice(),