|
|
@ -485,7 +485,7 @@ def change_star_data(): |
|
|
|
select count(*) from tabProcedure_Details where content like '%**%'; |
|
|
|
''', as_dict=1) |
|
|
|
print(count) |
|
|
|
|
|
|
|
updated_list = [] |
|
|
|
data = frappe.db.sql(''' |
|
|
|
select content_type,content,name,parent,replace(content,'**','abcxyz ') as new_content from tabProcedure_Details where content like '%**%'; |
|
|
|
''', as_dict=1) |
|
|
@ -504,4 +504,12 @@ def change_star_data(): |
|
|
|
FLAG = 0 |
|
|
|
frappe.db.sql( |
|
|
|
f'''update tabProcedure_Details set content = '{sts}' where name = '{v['name']}'; ''') |
|
|
|
return data |
|
|
|
v['new_content'] = sts |
|
|
|
updated_list.append(v) |
|
|
|
content_file = base_path + "/files/json_files/content_update.json" |
|
|
|
with open(content_file, 'w') as outfile: |
|
|
|
try: |
|
|
|
outfile.write(json.dumps(updated_list)) |
|
|
|
except: |
|
|
|
pass |
|
|
|
return content_file |