From 93fde21f8d713cce62479dac9a1eb74f13bcdc83 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期二, 07 十一月 2023 18:24:24 +0800
Subject: [PATCH] bug修复

---
 l2/transaction_progress.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/l2/transaction_progress.py b/l2/transaction_progress.py
index 9e38792..b507231 100644
--- a/l2/transaction_progress.py
+++ b/l2/transaction_progress.py
@@ -189,7 +189,7 @@
     def set_traded_index(self, code, index, total_datas = None):
         last_info = self.latest_buy_progress_index_cache.get(code)
         if not last_info or last_info[0] != index:
-            if last_info:
+            if last_info and total_datas:
                 val = total_datas[last_info[0]]['val']
                 rate = round(val["num"] * float(val["price"]) * 100 / (time.time() - last_info[1]))
                 # 鎴愪氦閫熺巼

--
Gitblit v1.8.0