Skip to content

Commit

Permalink
fix: avoid calling .replace() on None (LAN-845)
Browse files Browse the repository at this point in the history
  • Loading branch information
barredterra committed May 27, 2024
1 parent 2b3c3b8 commit efb04f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion landa/water_body_management/change_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def _build_modified_change_log(self, entry, changed_data, event):

# Newlines have been converted to <br> in the Version log
# Convert them back to newlines for consistency with the other endpoints
if frappe.get_meta(entry.doctype).get_field(key).fieldtype in ("Text", "Small Text"):
if data and frappe.get_meta(entry.doctype).get_field(key).fieldtype in ("Text", "Small Text"):
data = data.replace("<br>", "\n")

if row[0] == "location":
Expand Down

0 comments on commit efb04f8

Please sign in to comment.