fix: Image shown as broken in comment if private

This commit is contained in:
KanchanChauhan 2020-08-21 17:58:37 +05:30 committed by GitHub
parent fa1e8aef02
commit 613b91735e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -406,6 +406,10 @@ def extract_images_from_html(doc, content):
doctype = doc.parenttype if doc.parent else doc.doctype
name = doc.parent or doc.name
if doc.doctype == "Comment":
doctype = doc.reference_doctype
name = doc.reference_name
# TODO fix this
file_url = save_file(filename, content, doctype, name, decode=True).get("file_url")
if not frappe.flags.has_dataurl: