From 0df0181db15d0958f7dc3a57131c9bc723f623b3 Mon Sep 17 00:00:00 2001 From: porosnicuadrian Date: Tue, 20 Jul 2021 09:25:09 +0300 Subject: [PATCH] Use constant for empty string --- engine/responder.go | 2 +- sessions/sessions.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/responder.go b/engine/responder.go index 747808653..e6da85398 100644 --- a/engine/responder.go +++ b/engine/responder.go @@ -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()) { diff --git a/sessions/sessions.go b/sessions/sessions.go index 528f9863e..ba959f584 100644 --- a/sessions/sessions.go +++ b/sessions/sessions.go @@ -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 }