From 4487edb255175349613963db572d3bf55c7322b5 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 18 Feb 2025 14:49:52 +0530 Subject: [PATCH] fix: throw correct exception --- erpnext/manufacturing/doctype/job_card/job_card.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 734920c7bf5..64e1c2dd3a7 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -296,7 +296,8 @@ class JobCard(Document): frappe.throw( _( "Employee {0} is currently working on another workstation. Please assign another employee." - ).format(args.get("employee")) + ).format(args.get("employee")), + OverlapError, ) if not self.has_overlap(production_capacity, time_logs):