Fix: upgrade_requests Query in action_items try/except — schützt bestehende Action Items
This commit is contained in:
parent
947832f63d
commit
163a6ff6a5
1 changed files with 6 additions and 3 deletions
|
|
@ -124,9 +124,12 @@ async def action_items(user=Depends(require_mod)):
|
|||
users_today = conn.execute(
|
||||
"SELECT COUNT(*) FROM users WHERE DATE(created_at)=DATE('now')"
|
||||
).fetchone()[0]
|
||||
upgrades_pending = conn.execute(
|
||||
"SELECT COUNT(*) FROM upgrade_requests WHERE fulfilled_at IS NULL"
|
||||
).fetchone()[0]
|
||||
try:
|
||||
upgrades_pending = conn.execute(
|
||||
"SELECT COUNT(*) FROM upgrade_requests WHERE fulfilled_at IS NULL"
|
||||
).fetchone()[0]
|
||||
except Exception:
|
||||
upgrades_pending = 0
|
||||
return {
|
||||
"jobs_pending": jobs,
|
||||
"breeder_pending": breeders,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue