From 896bcbe55f52060bc39e94299afdec939512fe46 Mon Sep 17 00:00:00 2001 From: Ivo Oskamp Date: Sat, 3 Jan 2026 13:29:09 +0100 Subject: [PATCH] Auto-commit local changes before build (2026-01-03 13:29:09) --- .last-branch | 2 +- .../backupchecks/src/backend/app/main/routes_reports.py | 1 + docs/changelog.md | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.last-branch b/.last-branch index d601c96..0e6cd83 100644 --- a/.last-branch +++ b/.last-branch @@ -1 +1 @@ -v20260103-04-reports-default-period-fix +v20260103-05-reports-date-import-fix diff --git a/containers/backupchecks/src/backend/app/main/routes_reports.py b/containers/backupchecks/src/backend/app/main/routes_reports.py index 536dfad..aa60d18 100644 --- a/containers/backupchecks/src/backend/app/main/routes_reports.py +++ b/containers/backupchecks/src/backend/app/main/routes_reports.py @@ -1,4 +1,5 @@ from .routes_shared import * # noqa: F401,F403 +from datetime import date, timedelta def get_default_report_period(): """Return default report period (last 7 days).""" diff --git a/docs/changelog.md b/docs/changelog.md index 670afda..694d21e 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -28,6 +28,13 @@ - Fixed a NameError on the Reports page by adding the missing get_default_report_period helper. - Ensured a default reporting period is always available to prevent the Reports view from failing during load. +--- + +## v20260103-05-reports-date-import-fix + +- Fixed a crash on the Reports page caused by missing datetime imports. +- Added the required `date` and `timedelta` imports to prevent a NameError when determining the default report period. + ================================================================================================================================================ -- 2.45.2