From 9ac9d38c47765c01e815a3b86d30f4b3670a6722 Mon Sep 17 00:00:00 2001 From: qixinzhi Date: Tue, 9 Jan 2024 13:04:22 +0800 Subject: [PATCH] * Fix get date type error. --- module/metric/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/metric/model.php b/module/metric/model.php index 1f1350bc17..87edce78f6 100755 --- a/module/metric/model.php +++ b/module/metric/model.php @@ -1946,8 +1946,8 @@ class metricModel extends model public function getDateTypeByCode(string $code) { /* Get dateType form db first. */ - $dateType = $this->getByCode($code, 'dateType'); - if(!empty($dateType)) return $dateType; + $metric = $this->getByCode($code, 'dateType'); + if(!empty($metric->dateType)) return $metric->dateType; /* Get dateType from config second. */ if(isset($this->config->metric->dateType[$code])) return $this->config->metric->dateType[$code];