From 14ed80fe4bc93d25da9f44cd4b5a2777098aa9f4 Mon Sep 17 00:00:00 2001 From: "Troll (Hermes Agent)" Date: Sun, 2 Aug 2026 00:02:05 +0000 Subject: [PATCH] Fix dashboard filters: Delivered instead of Done, correct Needs Upload status mapping --- models.py | 2 ++ templates/admin/dashboard.html | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/models.py b/models.py index baa8c07..c1bcf95 100644 --- a/models.py +++ b/models.py @@ -118,6 +118,8 @@ def list_requests(status=None): """List all requests, optionally filtered by status, newest first.""" db = get_db() if status: + # Translate human filter names to stored status values. + status = status.lower().replace(' ', '_') rows = db.execute('SELECT * FROM requests WHERE status = ? ORDER BY created_at DESC', (status,)).fetchall() else: rows = db.execute('SELECT * FROM requests ORDER BY created_at DESC').fetchall() diff --git a/templates/admin/dashboard.html b/templates/admin/dashboard.html index 7b07808..3782aa8 100644 --- a/templates/admin/dashboard.html +++ b/templates/admin/dashboard.html @@ -127,9 +127,9 @@
All - Needs Upload + Needs Upload Awaiting Payment - Done + Delivered {% if refresh_seconds and refresh_seconds > 0 %} Auto-refresh every {{ refresh_seconds }}s