浏览代码

Fixed Unicode to ASCII doc

version-14
Achilles Rasquinha 7 年前
父节点
当前提交
8f0e0fc647
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      frappe/core/doctype/doctype/doctype.py

+ 1
- 1
frappe/core/doctype/doctype/doctype.py 查看文件

@@ -381,7 +381,7 @@ class DocType(Document):

# a DocType's name should not start with a number or underscore
# and should only contain letters, numbers and underscore
is_a_valid_name = re.match("^(?![\W])[^\d_\s][\w -]+$", name, re.UNICODE)
is_a_valid_name = re.match("^(?![\W])[^\d_\s][\w -]+$", name, re.ASCII)
if not is_a_valid_name:
frappe.throw(_("DocType's name should start with a letter and it can only consist of letters, numbers, spaces and underscores"), frappe.NameError)



正在加载...
取消
保存