浏览代码

Allow non-english field names in Custom Field #919

version-14
Anand Doshi 10 年前
父节点
当前提交
e5e80a27a3
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      frappe/model/db_schema.py

+ 2
- 2
frappe/model/db_schema.py 查看文件

@@ -8,6 +8,7 @@ Syncs a database table to the `DocType` (metadata)
.. note:: This module is only used internally

"""
import re
import os
import frappe
from frappe import _
@@ -401,8 +402,7 @@ class DbManager:

def validate_column_name(n):
n = n.replace(' ','_').strip().lower()
import re
if re.search("[\W]", n):
if re.search("[\W]", n, re.UNICODE):
frappe.throw(_("Fieldname {0} cannot contain letters, numbers or spaces").format(n), InvalidColumnName)
return n



正在加载...
取消
保存