diff --git a/erpnext/setup/doctype/naming_series/naming_series.py b/erpnext/setup/doctype/naming_series/naming_series.py index dc7a90cbb0..81a4c4ec5f 100644 --- a/erpnext/setup/doctype/naming_series/naming_series.py +++ b/erpnext/setup/doctype/naming_series/naming_series.py @@ -26,7 +26,8 @@ class NamingSeries(Document): except frappe.DoesNotExistError: continue - prefixes = prefixes + "\n" + options + if options: + prefixes = prefixes + "\n" + options prefixes.replace("\n\n", "\n") prefixes = "\n".join(sorted(prefixes.split()))