fix: throw correct exception

(cherry picked from commit 4487edb255)
This commit is contained in:
Mihir Kandoi
2025-02-18 14:49:52 +05:30
committed by Mergify
parent 22eaa14179
commit 5bccf9f837

View File

@@ -261,7 +261,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):