Merge pull request #17787 from nabinhait/naming-series-chars

fix: Allowed '{' and '}' in naming series
This commit is contained in:
Nabin Hait 2019-05-30 17:25:08 +05:30 committed by GitHub
commit b6ffaf11fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,8 +135,8 @@ class NamingSeries(Document):
def validate_series_name(self, n):
import re
if not re.match("^[\w\- /.#]*$", n, re.UNICODE):
throw(_('Special Characters except "-", "#", "." and "/" not allowed in naming series'))
if not re.match("^[\w\- /.#{}]*$", n, re.UNICODE):
throw(_('Special Characters except "-", "#", ".", "/", "{" and "}" not allowed in naming series'))
def get_options(self, arg=None):
if frappe.get_meta(arg or self.select_doc_for_series).get_field("naming_series"):