Use constant for empty string

This commit is contained in:
porosnicuadrian
2021-07-20 09:25:09 +03:00
committed by Dan Christian Bogos
parent a474a13778
commit 0df0181db1
2 changed files with 3 additions and 3 deletions

View File

@@ -329,7 +329,7 @@ func (rs *Responder) GetMaxSessionTime(arg *CallDescriptorWithAPIOpts, reply *ti
if arg.Tenant == utils.EmptyString {
arg.Tenant = config.CgrConfig().GeneralCfg().DefaultTenant
}
if arg.Subject == "" {
if arg.Subject == utils.EmptyString {
arg.Subject = arg.Account
}
if !rs.usageAllowed(arg.ToR, arg.GetDuration()) {

View File

@@ -1929,10 +1929,10 @@ func (sS *SessionS) BiRPCv1AuthorizeEvent(clnt rpcclient.ClientConnector,
return utils.NewErrMandatoryIeMissing(utils.CGREventString)
}
var withErrors bool
if args.CGREvent.ID == "" {
if args.CGREvent.ID == utils.EmptyString {
args.CGREvent.ID = utils.GenUUID()
}
if args.CGREvent.Tenant == "" {
if args.CGREvent.Tenant == utils.EmptyString {
args.CGREvent.Tenant = sS.cgrCfg.GeneralCfg().DefaultTenant
}