mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Set contexts/subsystems to *any if empty + tests
This commit is contained in:
committed by
Dan Christian Bogos
parent
04f45b15f2
commit
4305c505a8
@@ -2569,6 +2569,9 @@ func (dm *DataManager) SetAttributeProfile(ap *AttributeProfile, withIndex bool)
|
||||
if err != nil && err != utils.ErrNotFound {
|
||||
return err
|
||||
}
|
||||
if len(ap.Contexts) == 0 {
|
||||
ap.Contexts = append(ap.Contexts, utils.MetaAny)
|
||||
}
|
||||
if err = dm.DataDB().SetAttributeProfileDrv(ap); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -2826,6 +2829,9 @@ func (dm *DataManager) SetDispatcherProfile(dpp *DispatcherProfile, withIndex bo
|
||||
if err != nil && err != utils.ErrDSPProfileNotFound {
|
||||
return err
|
||||
}
|
||||
if len(dpp.Subsystems) == 0 {
|
||||
dpp.Subsystems = append(dpp.Subsystems, utils.MetaAny)
|
||||
}
|
||||
if err = dm.DataDB().SetDispatcherProfileDrv(dpp); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user