Skip to content

Commit

Permalink
fix: handle image extraction while editing comment
Browse files Browse the repository at this point in the history
(cherry picked from commit ba99f74)
  • Loading branch information
shariquerik authored and mergify[bot] committed Mar 16, 2023
1 parent 661820a commit 00c5f32
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion frappe/desk/form/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,14 @@ def update_comment(name, content):
if frappe.session.user not in ["Administrator", doc.owner]:
frappe.throw(_("Comment can only be edited by the owner"), frappe.PermissionError)

doc.content = content
if doc.reference_doctype and doc.reference_name:
reference_doc = frappe.get_doc(doc.reference_doctype, doc.reference_name)
reference_doc.check_permission()

doc.content = extract_images_from_html(reference_doc, content, is_private=True)
else:
doc.content = content

doc.save(ignore_permissions=True)


Expand Down

0 comments on commit 00c5f32

Please sign in to comment.