|
|
@ -412,15 +412,14 @@ def set_procedure_false(): |
|
|
|
@frappe.whitelist(allow_guest=1) |
|
|
|
def clear_procedures(): |
|
|
|
try: |
|
|
|
pass |
|
|
|
# set_procedure_false() |
|
|
|
# frappe.db.sql('''delete FROM `tabPublish`;''') |
|
|
|
# frappe.db.sql('''delete FROM `tabPublish_Docs`;''') |
|
|
|
|
|
|
|
# frappe.db.sql('''update `tabVariant Mapping_Assets` set published=0;''') |
|
|
|
# frappe.db.sql('''update `tabSystem Mapping_Sub System` set procedure_is_published=0;''') |
|
|
|
# frappe.db.sql('''update `tabSystem Mapping_System Assets` set published=0;''') |
|
|
|
# frappe.db.commit() |
|
|
|
set_procedure_false() |
|
|
|
frappe.db.sql('''delete FROM `tabPublish`;''') |
|
|
|
frappe.db.sql('''delete FROM `tabPublish_Docs`;''') |
|
|
|
|
|
|
|
frappe.db.sql('''update `tabVariant Mapping_Assets` set published=0;''') |
|
|
|
frappe.db.sql('''update `tabSystem Mapping_Sub System` set procedure_is_published=0;''') |
|
|
|
frappe.db.sql('''update `tabSystem Mapping_System Assets` set published=0;''') |
|
|
|
frappe.db.commit() |
|
|
|
except Exception as e: |
|
|
|
return e |
|
|
|
|
|
|
@ -445,3 +444,15 @@ def get_kms_mapping(sub_system,variant,language): |
|
|
|
return data |
|
|
|
except Exception as e: |
|
|
|
return e |
|
|
|
|
|
|
|
@frappe.whitelist(allow_guest=1) |
|
|
|
def remove_html_tags(): |
|
|
|
try: |
|
|
|
frappe.db.sql('''update tabProcedure_Details set content= replace(content,'>','>'); ''') |
|
|
|
frappe.db.sql('''update tabProcedure_Details set content= replace(content,'<','<'); ''') |
|
|
|
frappe.db.sql('''update tabProcedure_Details set content= replace(content,'<div class="ql-editor read-mode"><p>',''); ''') |
|
|
|
frappe.db.sql('''update tabProcedure_Details set content= replace(content,'</p></div>',''); ''') |
|
|
|
frappe.db.commit() |
|
|
|
return True, 'Done' |
|
|
|
except Exception as e: |
|
|
|
return False,e |