Browse Source

Allow non-english field names in Custom Field #919

version-14
Anand Doshi 10 years ago
parent
commit
e5e80a27a3
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      frappe/model/db_schema.py

+ 2
- 2
frappe/model/db_schema.py View File

@@ -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



Loading…
Cancel
Save