fix: Naming series check to avoid duplicate entry error (#19015)
* fix: Naming series check to avoid duplicate key error * fix: Check for existence of naming series
This commit is contained in:
parent
a5dfe0725f
commit
3b0ec48b0c
@ -151,7 +151,7 @@ class NamingSeries(Document):
|
||||
|
||||
def insert_series(self, series):
|
||||
"""insert series if missing"""
|
||||
if not frappe.db.get_value('Series', series, 'name', order_by="name"):
|
||||
if frappe.db.get_value('Series', series, 'name', order_by="name") == None:
|
||||
frappe.db.sql("insert into tabSeries (name, current) values (%s, 0)", (series))
|
||||
|
||||
def update_series_start(self):
|
||||
|
Loading…
Reference in New Issue
Block a user