From 53cd99a57874a6d2d081181624d01c5577a7a8d4 Mon Sep 17 00:00:00 2001 From: DanB Date: Wed, 7 Mar 2018 10:08:54 +0100 Subject: [PATCH] Console suppliers command - adding default time *now if none defined --- console/suppliers.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/console/suppliers.go b/console/suppliers.go index 3ebb9f6ad..bbadf2a7f 100644 --- a/console/suppliers.go +++ b/console/suppliers.go @@ -19,7 +19,10 @@ along with this program. If not, see package console import ( + "time" + "github.com/cgrates/cgrates/engine" + "github.com/cgrates/cgrates/utils" ) func init() { @@ -55,6 +58,9 @@ func (self *CmdSuppliersSort) RpcParams(reset bool) interface{} { } func (self *CmdSuppliersSort) PostprocessRpcParams() error { + if self.rpcParams.CGREvent.Time == nil { + self.rpcParams.CGREvent.Time = utils.TimePointer(time.Now()) + } return nil }