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 @@