添加原始数据长度校验,避免数据库保存失败

This commit is contained in:
2024-06-12 12:33:07 +08:00
parent 39dc97f004
commit 1f128c0cb4
2 changed files with 24 additions and 12 deletions

View File

@@ -88,3 +88,11 @@ def handle_insurance_type(string):
if not string:
return ""
return string.replace(":", "").replace("", "")
# 处理原始数据
def handle_original_data(string):
if not string:
return ""
# 防止过长存入数据库失败
return string[:255]