From ffa30127e7e449de7ef88316f7d83339b91a98bb Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 16 Nov 2022 23:23:06 +0530 Subject: [PATCH] fix: linters failing --- erpnext/manufacturing/doctype/work_order/work_order.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 4dd95a1a336..52753a092d4 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -96,9 +96,8 @@ class WorkOrder(Document): def validate_workstation_type(self): for row in self.operations: if not row.workstation and not row.workstation_type: - frappe.throw( - _(f"Row {row.idx}: Workstation or Workstation Type is mandatory for {row.operation}") - ) + msg = f"Row {row.idx}: Workstation or Workstation Type is mandatory for an operation {row.operation}" + frappe.throw(_(msg)) def validate_sales_order(self): if self.sales_order: