From e9890a3ec80bbf755c2c51b7b50f8822551b7d94 Mon Sep 17 00:00:00 2001 From: Shreya Shah Date: Thu, 11 Oct 2018 16:28:59 +0530 Subject: [PATCH] fix(patch): Check if meta object has naming_series field (#15651) --- erpnext/patches/v11_0/refactor_naming_series.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/patches/v11_0/refactor_naming_series.py b/erpnext/patches/v11_0/refactor_naming_series.py index 428e2c386a..b85ab66f14 100644 --- a/erpnext/patches/v11_0/refactor_naming_series.py +++ b/erpnext/patches/v11_0/refactor_naming_series.py @@ -106,6 +106,8 @@ def get_series(): continue if not frappe.db.has_column(doctype, 'naming_series'): continue + if not frappe.get_meta(doctype).has_field('naming_series'): + continue series_to_preserve = list(filter(None, get_series_to_preserve(doctype))) default_series = get_default_series(doctype)