mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 05:39:12 +00:00
fix: autofixes by semgrep
This commit is contained in:
@@ -50,5 +50,5 @@ def update_address_template(country, html, is_default=0):
|
||||
frappe.db.set_value("Address Template", country, "is_default", is_default)
|
||||
else:
|
||||
frappe.get_doc(
|
||||
dict(doctype="Address Template", country=country, is_default=is_default, template=html)
|
||||
doctype="Address Template", country=country, is_default=is_default, template=html
|
||||
).insert()
|
||||
|
||||
@@ -470,11 +470,9 @@ def setup_report():
|
||||
|
||||
if not frappe.db.get_value("Custom Role", dict(report=report_name)):
|
||||
frappe.get_doc(
|
||||
dict(
|
||||
doctype="Custom Role",
|
||||
report=report_name,
|
||||
roles=[dict(role="Accounts User"), dict(role="Accounts Manager")],
|
||||
)
|
||||
doctype="Custom Role",
|
||||
report=report_name,
|
||||
roles=[dict(role="Accounts User"), dict(role="Accounts Manager")],
|
||||
).insert()
|
||||
|
||||
|
||||
|
||||
@@ -50,9 +50,7 @@ def add_permissions():
|
||||
|
||||
if not frappe.db.get_value("Custom Role", dict(report="VAT Audit Report")):
|
||||
frappe.get_doc(
|
||||
dict(
|
||||
doctype="Custom Role",
|
||||
report="VAT Audit Report",
|
||||
roles=[dict(role="Accounts User"), dict(role="Accounts Manager"), dict(role="Auditor")],
|
||||
)
|
||||
doctype="Custom Role",
|
||||
report="VAT Audit Report",
|
||||
roles=[dict(role="Accounts User"), dict(role="Accounts Manager"), dict(role="Auditor")],
|
||||
).insert()
|
||||
|
||||
@@ -261,11 +261,9 @@ def add_custom_roles_for_reports():
|
||||
"""Add Access Control to UAE VAT 201."""
|
||||
if not frappe.db.get_value("Custom Role", dict(report="UAE VAT 201")):
|
||||
frappe.get_doc(
|
||||
dict(
|
||||
doctype="Custom Role",
|
||||
report="UAE VAT 201",
|
||||
roles=[dict(role="Accounts User"), dict(role="Accounts Manager"), dict(role="Auditor")],
|
||||
)
|
||||
doctype="Custom Role",
|
||||
report="UAE VAT 201",
|
||||
roles=[dict(role="Accounts User"), dict(role="Accounts Manager"), dict(role="Auditor")],
|
||||
).insert()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user