From bf753314758fb19f8d6aeb961e71111cdbb15d8f Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期一, 17 六月 2024 16:31:41 +0800 Subject: [PATCH] 加快L2数据请求速度 --- code_attribute/code_data_util.py | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/code_attribute/code_data_util.py b/code_attribute/code_data_util.py index 7abbee5..f21e00e 100644 --- a/code_attribute/code_data_util.py +++ b/code_attribute/code_data_util.py @@ -84,7 +84,9 @@ @return: """ fresults = cls.__mysql.select_one(f"select count(code) from kpl_zylt_volume where update_time >= '{tool.get_now_date_str()}'") - return fresults[0] + if fresults: + return fresults[0] + return 0 -- Gitblit v1.8.0