Browse Source

remove extra spaces in field

master
venkataakhil 1 year ago
parent
commit
522cad6321
  1. 4
      smart_service/apis/master_api.py

4
smart_service/apis/master_api.py

@ -467,8 +467,8 @@ def remove_extra_spaces_in_file_path():
data = json.load(outfile)
for d in data:
res_str = re.sub("/files/ /", "/files/", d['file'])
res_str = re.sub("/files/ ", "/files/", res_str)
res_str = re.sub("/files/ ", "/files/", d['file'])
# res_str = re.sub("/files/ ", "/files/", res_str)
print(res_str)
frappe.db.sql(f'''
update tabProcedure_Details set file = '{res_str}' where name = '{d['name']}';

Loading…
Cancel
Save