修正录入remark时原来为空时的格式错误(字符串以\\\\\n开端)

This commit is contained in:
wangweiye7840 2024-03-12 18:37:30 +08:00
parent 34ee3a11c1
commit 9d36069132
1 changed files with 3 additions and 0 deletions

View File

@ -567,6 +567,9 @@ def AppendData(prodict,fieldsdict,field_id_and_content): #用添加方式修改
if fieldType == "str":
if content.strip() in prodict[id][field]:
print("题号 %s%s 字段, 内容 %s 已存在"%(id,field,content))
elif prodict[id][field].strip() == "":
prodict[id][field] = content.strip()
print("已于 %s%s 字段执行添加, 内容为 %s"%(id,field,content))
else:
prodict[id][field] = (prodict[id][field].strip() + "\\\\\n" + content).strip()
print("已于 %s%s 字段执行添加, 内容为 %s"%(id,field,content))