From 707c523b53c03b3254bcb9ed33cb3f90decaf2ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B3=D0=BE=D1=80=D1=8C=20=D0=91=D0=B0=D0=BD=D0=B4?= =?UTF-8?q?=D1=83=D1=80=D0=B8=D1=81=D1=82?= Date: Thu, 7 May 2026 20:59:25 +1000 Subject: [PATCH] abrc cj[hfytybz --- api/routes.py | 2 +- services/document_builder.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/routes.py b/api/routes.py index 94213f0..d5c7da4 100644 --- a/api/routes.py +++ b/api/routes.py @@ -137,7 +137,7 @@ def setup_routes(app: FastAPI) -> None: # 2. Собираем все файлы .docx за период all_files = [] current_date = start_date - while current_date <= finish_date: + while current_date <= finish_date + timedelta(days=1): date_path = current_date.strftime("%Y/%m/%d") full_dir_path = os.path.join(DOCUMENTS_DIR, date_path) diff --git a/services/document_builder.py b/services/document_builder.py index f8188ef..7c12247 100644 --- a/services/document_builder.py +++ b/services/document_builder.py @@ -82,7 +82,7 @@ def update_bd_and_create_document( doc.add_heading('Оригинальный текст', level=1) doc.add_paragraph(original_text) - doc_name = f"{data['title']}.docx" + doc_name = f"{data['title'][:200]}.docx" doc_path = os.path.join(documents_path, doc_name) doc.save(doc_path) print(f"Сохранен документ: {doc_path}")