Skip to content

Commit

Permalink
refactor(new_sc_flow_2): Fixed error thrown by semgrep
Browse files Browse the repository at this point in the history
  • Loading branch information
mihir-kandoi committed Dec 17, 2024
1 parent fd4ee81 commit 555dd7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
exclude: 'node_modules|.git'
default_stages: [pre-commit]
default_stages: [commit]
fail_fast: false


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ def validate_service_items(self):

for service_item in self.service_items:
if frappe.get_value("Item", service_item.item_code, "is_stock_item"):
msg = f"Service Item {service_item.item_name} must be a non-stock item."
frappe.throw(_(msg))
frappe.throw(_("Service Item {0} must be a non-stock item.").format(service_item.item_code))

item = next(
item for item in self.items if item.purchase_order_item == service_item.purchase_order_item
Expand Down

0 comments on commit 555dd7c

Please sign in to comment.