fix: check if path is present

This commit is contained in:
Jannat Patel
2022-09-19 17:56:49 +05:30
parent 4ba6ea9190
commit 37f2e7eeda

View File

@@ -463,7 +463,7 @@ def get_certificates(member=None):
def validate_image(path):
if "/private" in path:
if path and "/private" in path:
file = frappe.get_doc("File", {"file_url": path})
file.is_private = 0
file.save(ignore_permissions=True)