fix: use .get() to set fieldtype

This commit is contained in:
prssanna 2020-04-07 18:11:39 +05:30
parent 8f3209c5e9
commit 5b5d8031ce

View file

@ -507,7 +507,7 @@ class BaseDocument(object):
value = values[fetch_from_fieldname]
if _df.fieldtype == 'Small Text' or _df.fieldtype == 'Text' or _df.fieldtype == 'Data':
fetch_from_df = frappe.get_meta(doctype).get_field(fetch_from_fieldname)
fetch_from_ft = fetch_from_df and fetch_from_df.fieldtype
fetch_from_ft = fetch_from_df.get('fieldtype')
if fetch_from_ft == 'Text Editor' and value:
value = unescape_html(strip_html(value))