Merge pull request #21629 from anandbaburajan/attach_multiple_files_to_document_fix
This commit is contained in:
commit
9a035864d5
1 changed files with 3 additions and 3 deletions
|
|
@ -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",
|
||||
|
|
@ -319,7 +319,7 @@ def attach_files_to_document(doc: "Document", event) -> None:
|
|||
"attached_to_field": df.fieldname,
|
||||
},
|
||||
):
|
||||
return
|
||||
continue
|
||||
|
||||
unattached_file = frappe.db.exists(
|
||||
"File",
|
||||
|
|
@ -341,7 +341,7 @@ def attach_files_to_document(doc: "Document", event) -> None:
|
|||
"attached_to_field": df.fieldname,
|
||||
},
|
||||
)
|
||||
return
|
||||
continue
|
||||
|
||||
file: "File" = frappe.get_doc(
|
||||
doctype="File",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue