Explorar el Código

Merge pull request #2054 from nabinhait/field_char_limit

Validate length of fieldname
version-14
Nabin Hait hace 8 años
committed by GitHub
padre
commit
7bb304dd1a
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. +3
    -0
      frappe/model/db_schema.py

+ 3
- 0
frappe/model/db_schema.py Ver fichero

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


Cargando…
Cancelar
Guardar