[hotfix] ignore validate_length for single doctypes (#4343)

This commit is contained in:
Makarand Bauskar 2017-10-27 14:49:38 +05:30 committed by Rushabh Mehta
parent 03da960fd5
commit 6574920ca0

View file

@ -530,6 +530,10 @@ class BaseDocument(object):
if frappe.flags.in_install:
return
if self.meta.issingle:
# single doctype value type is mediumtext
return
for fieldname, value in iteritems(self.get_valid_dict()):
df = self.meta.get_field(fieldname)
if df and df.fieldtype in type_map and type_map[df.fieldtype][0]=="varchar":