From 0fcb3cd918d3a9fd14bb15d86b128b0aab85e325 Mon Sep 17 00:00:00 2001 From: Marica Date: Thu, 14 Oct 2021 19:21:41 +0530 Subject: [PATCH] fix: Use strip instead of lstrip and rstrip Co-authored-by: Ankush Menat (cherry picked from commit 8cf188d9c0f195d9caca5caa698ebc9b675e5906) --- erpnext/controllers/stock_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index dfb53c7543c..08d422d3bcd 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -85,7 +85,7 @@ class StockController(AccountsController): # strip preceeding and succeeding spaces for each SN # (SN could have valid spaces in between e.g. SN - 123 - 2021) serial_no_list = row.serial_no.split("\n") - serial_no_list = [sn.lstrip().rstrip() for sn in serial_no_list] + serial_no_list = [sn.strip() for sn in serial_no_list] row.serial_no = "\n".join(serial_no_list)