From 01f581fbb9f7a2a49a57520a8980cf75b9c6b864 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期一, 01 七月 2024 16:30:30 +0800
Subject: [PATCH] 只买正式条件的目标标的/调整买入金额为1w

---
 code_attribute/code_volumn_manager.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/code_attribute/code_volumn_manager.py b/code_attribute/code_volumn_manager.py
index 5aa094f..3687f64 100644
--- a/code_attribute/code_volumn_manager.py
+++ b/code_attribute/code_volumn_manager.py
@@ -93,7 +93,12 @@
     max60, yesterday = get_histry_volumn(code)
     if today is None:
         today = 0
-    if today is None or max60 is None or yesterday is None:
+    if max60 is None or yesterday is None:
+        max60 = [today, '']
+        yesterday = today
+        if max60[0] < 1:
+            max60[0] = 1
+
         raise Exception(f"鑾峰彇閲忓け璐�:{code}")
     rate = round((int(today) + total_sell_volume) / max(int(max60[0]), int(yesterday)), 2)
     if not with_info:

--
Gitblit v1.8.0