Console suppliers command - adding default time *now if none defined

This commit is contained in:
DanB
2018-03-07 10:08:54 +01:00
parent e196c5db14
commit 53cd99a578

View File

@@ -19,7 +19,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
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
}