From 2b9186da5a5107dbf2066da04bc3c1dbf1f68ee2 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 28 Aug 2018 15:02:59 +0530 Subject: [PATCH] [fix] naming series patch --- erpnext/patches/v11_0/refactor_naming_series.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/patches/v11_0/refactor_naming_series.py b/erpnext/patches/v11_0/refactor_naming_series.py index 3a2cdbd8cde..d5af9399b0f 100644 --- a/erpnext/patches/v11_0/refactor_naming_series.py +++ b/erpnext/patches/v11_0/refactor_naming_series.py @@ -110,7 +110,7 @@ def get_series(): return series_to_set def get_series_to_preserve(doctype): - series_to_preserve = frappe.db.sql_list("""select distinct naming_series from `tab{doctype}`""".format(doctype=doctype)) + series_to_preserve = frappe.db.sql_list("""select distinct naming_series from `tab{doctype}` where ifnull(naming_series, '') != ''""".format(doctype=doctype)) series_to_preserve.sort() return series_to_preserve