From 7218747fcaca89b2da170070098d1945a4ce786f Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期一, 11 九月 2023 13:44:10 +0800
Subject: [PATCH] bug修复

---
 third_data/code_plate_key_manager.py |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/third_data/code_plate_key_manager.py b/third_data/code_plate_key_manager.py
index b47fb4d..02ecf7a 100644
--- a/third_data/code_plate_key_manager.py
+++ b/third_data/code_plate_key_manager.py
@@ -610,15 +610,18 @@
                                  before_blocks_dict):
         # 鍔犺浇娑ㄥ仠浠g爜鐨勭洰鏍囨澘鍧�
         def load_code_block():
-            for d in limit_up_record_datas:
-                if d[2] in constant.KPL_INVALID_BLOCKS and d[3] in before_blocks_dict:
-                    code_limit_up_reason_dict[d[3]] = list(before_blocks_dict.get(d[3]))[0]
-                else:
-                    code_limit_up_reason_dict[d[3]] = d[2]
+            if limit_up_record_datas:
+                for d in limit_up_record_datas:
+                    if d[2] in constant.KPL_INVALID_BLOCKS and d[3] in before_blocks_dict:
+                        code_limit_up_reason_dict[d[3]] = list(before_blocks_dict.get(d[3]))[0]
+                    else:
+                        code_limit_up_reason_dict[d[3]] = d[2]
             return code_limit_up_reason_dict
 
         if current_limit_up_datas is None:
             current_limit_up_datas = []
+        if limit_up_record_datas is None:
+            limit_up_record_datas = []
         code_limit_up_reason_dict = {}
         load_code_block()
         can_buy, msg = cls.__is_block_can_buy(code, block, current_limit_up_datas, code_limit_up_reason_dict,

--
Gitblit v1.8.0