From faab5743d93973d160f4a24888fc9d528d5107d4 Mon Sep 17 00:00:00 2001 From: Rahul Agrawal <12agrawalrahul@gmail.com> Date: Fri, 10 Oct 2025 06:45:18 +0530 Subject: [PATCH] ci: fix semgrep for #4 --- ls_shop/install_demo_data.py | 7 ++++--- ls_shop/publish_demo_items.py | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ls_shop/install_demo_data.py b/ls_shop/install_demo_data.py index 5f7ff63..0da0cf1 100644 --- a/ls_shop/install_demo_data.py +++ b/ls_shop/install_demo_data.py @@ -82,8 +82,8 @@ def install_demo_data(): print(" - Brake System") print(" - Interior Accessories") print("\n") - - frappe.db.commit() # nosemgrep: manual commit required for demo data installation completion + # nosemgrep: manual commit required for demo data installation completion + frappe.db.commit() except Exception as e: frappe.db.rollback() @@ -143,7 +143,8 @@ def ensure_attribute_values(attribute_name, values, numeric=False): } ) attr.insert(ignore_permissions=True) - frappe.db.commit() # nosemgrep: manual commit required for attribute creation in demo data + # nosemgrep: manual commit required for attribute creation in demo data + frappe.db.commit() print(f" āœ“ {attribute_name} attribute created") else: # Attribute exists, just print message diff --git a/ls_shop/publish_demo_items.py b/ls_shop/publish_demo_items.py index 2c59c12..28aea66 100644 --- a/ls_shop/publish_demo_items.py +++ b/ls_shop/publish_demo_items.py @@ -98,8 +98,8 @@ def publish_all_demo_items(): else: frappe.db.set_value("Website Item", wi.name, "route", item_code) routed += 1 - - frappe.db.commit() # nosemgrep: manual commit required for demo item publishing completion + # nosemgrep: manual commit required for demo item publishing completion + frappe.db.commit() frappe.clear_cache() print("\nāœ… Complete!")