From 89a9afab94e17570ece7850606cdf00a8b84ed06 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 30 Mar 2022 17:00:28 +0530 Subject: [PATCH] fix: cast array slice index integer while splitting serial_nos array (#30468) (#30496) (cherry picked from commit 3f3717952c94af428c3d4c919aceb6b8cbae7679) Co-authored-by: Anoop --- erpnext/manufacturing/doctype/work_order/work_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index c8c2f9a9320..2ee848c356a 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -1327,7 +1327,7 @@ def get_serial_nos_for_job_card(row, wo_doc): used_serial_nos.extend(get_serial_nos(d.serial_no)) serial_nos = sorted(list(set(serial_nos) - set(used_serial_nos))) - row.serial_no = "\n".join(serial_nos[0 : row.job_card_qty]) + row.serial_no = "\n".join(serial_nos[0 : cint(row.job_card_qty)]) def validate_operation_data(row):