fix(python): remove datetime.UTC usage for Python 3.10 compatibility

Replace datetime.datetime.now(datetime.UTC) with datetime.datetime.now()
to fix compatibility issues with Python 3.10 and earlier versions.

datetime.UTC is only available in Python 3.11+, causing 500 errors
in production environment.

Files fixed:
- app/module/dataset/service/pdf_extract.py
- app/module/generation/service/export_service.py
This commit is contained in:
2026-02-06 13:34:27 +08:00
parent fbc83b5610
commit c6dccf5e29
2 changed files with 2 additions and 2 deletions

View File

@@ -278,7 +278,7 @@ class PdfTextExtractService:
file_type=derived_file_type,
file_size=file_size,
dataset_filemetadata=metadata,
last_access_time=datetime.datetime.now(datetime.UTC),
last_access_time=datetime.datetime.now(),
)
self.db.add(record)
dataset.file_count = (dataset.file_count or 0) + 1