fix: Semgrep
- Explain explicit commits and skip semgrep
- Format client side translated string correctly
diff --git a/erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py b/erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py
index 172f38d..ce27743 100644
--- a/erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py
+++ b/erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py
@@ -160,4 +160,4 @@
finally:
frappe.db.auto_commit_on_many_writes = 0
- frappe.db.commit()
+ frappe.db.commit() # nosemgrep
diff --git a/erpnext/manufacturing/doctype/bom_update_log/test_bom_update_log.py b/erpnext/manufacturing/doctype/bom_update_log/test_bom_update_log.py
index 52ca9cd..d1da18d 100644
--- a/erpnext/manufacturing/doctype/bom_update_log/test_bom_update_log.py
+++ b/erpnext/manufacturing/doctype/bom_update_log/test_bom_update_log.py
@@ -36,7 +36,9 @@
frappe.db.delete("BOM Update Log")
self.new_bom_doc.cancel()
self.new_bom_doc.delete()
- frappe.db.commit() # explicitly commit and restore to original state
+
+ # explicitly commit and restore to original state
+ frappe.db.commit() # nosemgrep
def test_bom_update_log_validate(self):
"Test if BOM presence is validated."
diff --git a/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.js b/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.js
index a793ed9..7ba6517 100644
--- a/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.js
+++ b/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.js
@@ -78,7 +78,7 @@
confirm_job_start: (frm, log_data) => {
let log_link = frappe.utils.get_form_link("BOM Update Log", log_data.name, true);
frappe.msgprint({
- "message": __(`BOM Updation is queued and may take a few minutes. Check ${log_link} for progress.`),
+ "message": __("BOM Updation is queued and may take a few minutes. Check {0} for progress.", [log_link]),
"title": __("BOM Update Initiated"),
"indicator": "blue"
});