From a77db328f0dcef6fc797bc27a41b1ece907783a7 Mon Sep 17 00:00:00 2001 From: Maciej Pienczyn Date: Fri, 20 Feb 2026 12:29:57 +0100 Subject: [PATCH] fix: use upload date (not meeting date) for board document storage path DocumentUploadService.get_file_path() resolves paths using uploaded_at, so import scripts must store files in directories matching that date. Co-Authored-By: Claude Opus 4.6 --- scripts/import_board_documents_2_2026.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/import_board_documents_2_2026.py b/scripts/import_board_documents_2_2026.py index 6f76738..cbb5f58 100644 --- a/scripts/import_board_documents_2_2026.py +++ b/scripts/import_board_documents_2_2026.py @@ -79,8 +79,9 @@ def main(): print(f"Uploader: {uploader.name} (id={uploader.id})") - # Create target directory - target_dir = os.path.join(UPLOAD_BASE, '2026', '02') + # Create target directory (use current date, matching DocumentUploadService logic) + now = datetime.now() + target_dir = os.path.join(UPLOAD_BASE, str(now.year), f"{now.month:02d}") os.makedirs(target_dir, exist_ok=True) print(f"Target directory: {target_dir}")