fix: Private images in comments are not visible

This commit is contained in:
MitulDavid 2021-10-11 18:43:12 +05:30
parent 05cb2c16cd
commit 33bfd5bd19

View file

@ -66,7 +66,8 @@ def add_comment(reference_doctype, reference_name, content, comment_email, comme
comment_type='Comment',
comment_by=comment_by
))
doc.content = extract_images_from_html(doc, content, is_private=True)
reference_doc = frappe.get_doc(reference_doctype, reference_name)
doc.content = extract_images_from_html(reference_doc, content, is_private=True)
doc.insert(ignore_permissions=True)
follow_document(doc.reference_doctype, doc.reference_name, frappe.session.user)