[fix] frappe.db.exists('Series', series) is not working because tabSeries table did not have column modified
diff --git a/erpnext/setup/doctype/naming_series/naming_series.py b/erpnext/setup/doctype/naming_series/naming_series.py
index a9832de..d6e7ea7 100644
--- a/erpnext/setup/doctype/naming_series/naming_series.py
+++ b/erpnext/setup/doctype/naming_series/naming_series.py
@@ -141,7 +141,7 @@
def insert_series(self, series):
"""insert series if missing"""
- if not frappe.db.exists('Series', series):
+ if not frappe.db.get_value('Series', series, 'name', order_by="name"):
frappe.db.sql("insert into tabSeries (name, current) values (%s, 0)", (series))
def update_series_start(self):