fix in case doctype not found

This commit is contained in:
Achilles Rasquinha 2018-03-29 14:24:59 +05:30
parent ddd226c1a1
commit bb58bd8d19

View file

@ -41,10 +41,9 @@ def _cast_result(doctype, result):
try:
for field, value in result:
try:
df = frappe.get_meta(doctype).get_field(field)
except:
df = frappe.get_meta(doctype, cached = True)
df = frappe.get_meta(doctype).get_field(field)
if df:
value = cast_fieldtype(df.fieldtype, value)
batch.append(tuple([field, value]))
except Exception: