Commit defc420a by 岳巧源

skip special str

parent e1524808
Showing with 9 additions and 0 deletions
......@@ -273,7 +273,16 @@ def handle_vc_unit(conf: dict):
"""
input_type 为10的单位单独处理。
"""
if str(unit) == "" or str(unit) == "[]":
continue
end = str(unit).find(",")
"""
特殊的例如 ["V"]
"""
if end == -1:
end = str(unit).find("]")
if end == -1:
continue
default_unit = unit[2:end-1]
update_sql = "update lie_shop_attr set default_unit = %s where id = %s"
cursor.execute(query=update_sql, args=(default_unit, id,))
......
File mode changed
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment