From 814add52b714bdbba44b83148595a4e57db5af79 Mon Sep 17 00:00:00 2001 From: venkataakhil Date: Thu, 22 Jun 2023 16:20:54 +0530 Subject: [PATCH] App labels underscore allow --- smart_service/apis/support.py | 16 ++++++++-------- .../masters/doctype/app_labels/app_labels.js | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/smart_service/apis/support.py b/smart_service/apis/support.py index 5ec3cc3..bc29b6f 100644 --- a/smart_service/apis/support.py +++ b/smart_service/apis/support.py @@ -412,14 +412,14 @@ def set_procedure_false(): @frappe.whitelist(allow_guest=1) def clear_procedures(): try: - 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 diff --git a/smart_service/masters/doctype/app_labels/app_labels.js b/smart_service/masters/doctype/app_labels/app_labels.js index a27107f..a35ccff 100644 --- a/smart_service/masters/doctype/app_labels/app_labels.js +++ b/smart_service/masters/doctype/app_labels/app_labels.js @@ -36,7 +36,7 @@ frappe.ui.form.on('App Labels', { frappe.throw(__("Just a . is not prescribed!")); frappe.validated = false; } - var regex = /[!@#$%^&*()_+\=\[\]{};`~':"\\|.<>\/?]+/; + var regex = /[!@#$%^&*()+\=\[\]{};`~':"\\|.<>\/?]+/; if (frm.doc.english_label) { if (regex.test(frm.doc.english_label) === true) { frappe.throw(__("English Label : Only letters, numbers and - , are allowed."));