fix: allow braces for custom field names

This commit is contained in:
Himanshu
2019-04-14 00:54:24 +05:30
committed by GitHub
parent 023a865e1e
commit dc34393b8a

View File

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