diff --git a/setup/doctype/naming_series/naming_series.py b/setup/doctype/naming_series/naming_series.py index c9604fc949..9cc4de294b 100644 --- a/setup/doctype/naming_series/naming_series.py +++ b/setup/doctype/naming_series/naming_series.py @@ -121,8 +121,7 @@ class DocType: def get_current(self, arg=None): """get series current""" - self.doc.current_value = webnotes.conn.sql("""select current from tabSeries where name=%s""", - self.doc.prefix)[0][0] + self.doc.current_value = webnotes.conn.get_value("Series", self.doc.prefix, "current") def insert_series(self, series): """insert series if missing"""