fix: validate_series
This commit is contained in:
parent
3f14aafa67
commit
940c75f8ac
@ -10,6 +10,7 @@ from frappe import msgprint, throw, _
|
||||
from frappe.model.document import Document
|
||||
from frappe.model.naming import parse_naming_series
|
||||
from frappe.permissions import get_doctypes_with_read
|
||||
from frappe.core.doctype.doctype.doctype import validate_series
|
||||
|
||||
class NamingSeriesNotSetError(frappe.ValidationError): pass
|
||||
|
||||
@ -126,7 +127,7 @@ class NamingSeries(Document):
|
||||
dt = frappe.get_doc("DocType", self.select_doc_for_series)
|
||||
options = self.scrub_options_list(self.set_options.split("\n"))
|
||||
for series in options:
|
||||
dt.validate_series(series)
|
||||
validate_series(dt, series)
|
||||
for i in sr:
|
||||
if i[0]:
|
||||
existing_series = [d.split('.')[0] for d in i[0].split("\n")]
|
||||
|
Loading…
Reference in New Issue
Block a user