mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Use constant for empty string
This commit is contained in:
committed by
Dan Christian Bogos
parent
a474a13778
commit
0df0181db1
@@ -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()) {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user