Fix dashboard filters: Delivered instead of Done, correct Needs Upload status mapping
This commit is contained in:
parent
ec313601b6
commit
14ed80fe4b
2 changed files with 4 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Reference in a new issue