diff --git a/erpnext/setup/doctype/naming_series/naming_series.py b/erpnext/setup/doctype/naming_series/naming_series.py index cc6940398f..a9832de7d4 100644 --- a/erpnext/setup/doctype/naming_series/naming_series.py +++ b/erpnext/setup/doctype/naming_series/naming_series.py @@ -130,7 +130,8 @@ class NamingSeries(Document): throw(_('Special Characters except "-", "#", "." and "/" not allowed in naming series')) def get_options(self, arg=None): - return frappe.get_meta(arg or self.select_doc_for_series).get_field("naming_series").options + if frappe.get_meta(arg or self.select_doc_for_series).get_field("naming_series"): + return frappe.get_meta(arg or self.select_doc_for_series).get_field("naming_series").options def get_current(self, arg=None): """get series current"""