mirror of
https://github.com/frappe/lms.git
synced 2026-05-02 13:39:31 +03:00
fix: check if path is present
This commit is contained in:
+1
-1
@@ -463,7 +463,7 @@ def get_certificates(member=None):
|
|||||||
|
|
||||||
|
|
||||||
def validate_image(path):
|
def validate_image(path):
|
||||||
if "/private" in path:
|
if path and "/private" in path:
|
||||||
file = frappe.get_doc("File", {"file_url": path})
|
file = frappe.get_doc("File", {"file_url": path})
|
||||||
file.is_private = 0
|
file.is_private = 0
|
||||||
file.save(ignore_permissions=True)
|
file.save(ignore_permissions=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user