fix: Image shown as broken in comment if private
This commit is contained in:
parent
fa1e8aef02
commit
613b91735e
1 changed files with 4 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue