mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-17 22:29:55 +05:00
Updated apiers by adding tenant default value in apier/v2
This commit is contained in:
committed by
Dan Christian Bogos
parent
010a7e92c7
commit
5baaeba5a8
@@ -33,9 +33,12 @@ type AttributeWithCache struct {
|
||||
|
||||
//SetAttributeProfile add/update a new Attribute Profile
|
||||
func (APIerSv2 *APIerSv2) SetAttributeProfile(arg *AttributeWithCache, reply *string) error {
|
||||
if missing := utils.MissingStructFields(arg.ExternalAttributeProfile, []string{utils.Tenant, utils.ID}); len(missing) != 0 {
|
||||
if missing := utils.MissingStructFields(arg.ExternalAttributeProfile, []string{utils.ID}); len(missing) != 0 {
|
||||
return utils.NewErrMandatoryIeMissing(missing...)
|
||||
}
|
||||
if arg.Tenant == utils.EmptyString {
|
||||
arg.Tenant = APIerSv2.Config.GeneralCfg().DefaultTenant
|
||||
}
|
||||
alsPrf, err := arg.ExternalAttributeProfile.AsAttributeProfile()
|
||||
if err != nil {
|
||||
return utils.APIErrorHandler(err)
|
||||
|
||||
Reference in New Issue
Block a user