fix: Semgrep

- Explain explicit commits and skip semgrep
- Format client side translated string correctly
This commit is contained in:
marination 2022-03-30 13:22:29 +05:30
parent 79495679e2
commit ebf00946c9
3 changed files with 5 additions and 3 deletions

View File

@ -160,4 +160,4 @@ def run_bom_job(
finally:
frappe.db.auto_commit_on_many_writes = 0
frappe.db.commit()
frappe.db.commit() # nosemgrep

View File

@ -36,7 +36,9 @@ class TestBOMUpdateLog(FrappeTestCase):
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."

View File

@ -78,7 +78,7 @@ frappe.ui.form.on('BOM Update Tool', {
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"
});