Browse Source

Merge pull request #2054 from nabinhait/field_char_limit

Validate length of fieldname
version-14
Nabin Hait 8 years ago
committed by GitHub
parent
commit
7bb304dd1a
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      frappe/model/db_schema.py

+ 3
- 0
frappe/model/db_schema.py View File

@@ -102,6 +102,9 @@ class DbTable:
columns += self.columns.values()

for col in columns:
if len(col.fieldname) >= 64:
frappe.throw(_("Fieldname is limited to 64 characters"))
if col.fieldtype in type_map and type_map[col.fieldtype][0]=="varchar":

# validate length range


Loading…
Cancel
Save