解决关键信息未找到时传None的问题

This commit is contained in:
2024-07-20 16:56:39 +08:00
parent 39c20a1f36
commit 629d3710a8

View File

@@ -7,6 +7,8 @@ from util import util
# 处理金额类数据 # 处理金额类数据
def handle_decimal(string): def handle_decimal(string):
if not string:
return ""
string = re.sub(r'[^0-9.]', '', string) string = re.sub(r'[^0-9.]', '', string)
if not string: if not string:
return "" return ""