fix: Use correct Attachments folder in code list import

(cherry picked from commit bc2cb1737a)
This commit is contained in:
Corentin Forler
2025-07-18 16:17:42 +02:00
committed by Mergify
parent 5bc3273460
commit f415bc3d14

View File

@@ -60,7 +60,7 @@ def import_genericode():
"doctype": "File",
"attached_to_doctype": "Code List",
"attached_to_name": code_list.name,
"folder": "Home/Attachments",
"folder": frappe.db.get_value("File", {"is_attachments_folder": 1}),
"file_name": frappe.local.uploaded_filename,
"file_url": frappe.local.uploaded_file_url,
"is_private": 1,