修正录入remark时原来为空时的格式错误(字符串以\\\\\n开端)
This commit is contained in:
parent
34ee3a11c1
commit
9d36069132
|
|
@ -567,6 +567,9 @@ def AppendData(prodict,fieldsdict,field_id_and_content): #用添加方式修改
|
||||||
if fieldType == "str":
|
if fieldType == "str":
|
||||||
if content.strip() in prodict[id][field]:
|
if content.strip() in prodict[id][field]:
|
||||||
print("题号 %s 的 %s 字段, 内容 %s 已存在"%(id,field,content))
|
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:
|
else:
|
||||||
prodict[id][field] = (prodict[id][field].strip() + "\\\\\n" + content).strip()
|
prodict[id][field] = (prodict[id][field].strip() + "\\\\\n" + content).strip()
|
||||||
print("已于 %s 的 %s 字段执行添加, 内容为 %s"%(id,field,content))
|
print("已于 %s 的 %s 字段执行添加, 内容为 %s"%(id,field,content))
|
||||||
|
|
|
||||||
Reference in New Issue