fix: dont stop next unattached file from being attached if file_url of first file is invalid

This commit is contained in:
anandbaburajan 2023-07-11 12:37:29 +05:30
parent 638c9ea5b9
commit 04f8d231a7

View file

@ -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",