From 04f8d231a70854334c137922c224aeb1f4dfe01a Mon Sep 17 00:00:00 2001 From: anandbaburajan Date: Tue, 11 Jul 2023 12:37:29 +0530 Subject: [PATCH] fix: dont stop next unattached file from being attached if file_url of first file is invalid --- frappe/core/doctype/file/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/core/doctype/file/utils.py b/frappe/core/doctype/file/utils.py index 8f4b326596..b106ea67c5 100644 --- a/frappe/core/doctype/file/utils.py +++ b/frappe/core/doctype/file/utils.py @@ -308,7 +308,7 @@ def attach_files_to_document(doc: "Document", event) -> None: # we dont want the update to fail if file cannot be attached for some reason value = doc.get(df.fieldname) if not (value or "").startswith(("/files", "/private/files")): - return + continue if frappe.db.exists( "File",