fix(exporter): don't crash when a Text Editor field doesn't have a value

Stacktrace: https://katb.in/rumuxohevar

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2024-08-19 12:59:36 +05:30
parent f63abe1b54
commit f281638156
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

View file

@ -143,7 +143,7 @@ class Exporter:
if df.fieldtype == "Duration":
value = format_duration(flt(value), df.hide_days)
if df.fieldtype == "Text Editor":
if df.fieldtype == "Text Editor" and value:
value = frappe.core.utils.html2text(value)
row[i] = value
return rows