diff --git a/app/routers/web.py b/app/routers/web.py index f33e14a..55cea60 100644 --- a/app/routers/web.py +++ b/app/routers/web.py @@ -595,8 +595,8 @@ def dashboard(request: Request, user: User = Depends(get_current_user_web), db: received = sum(1 for c in all_cards if c.status == "received") countries = len({c.country for c in all_cards if c.country}) - # recent postcards across all profiles (last 8) - all_cards.sort(key=lambda c: c.created_at, reverse=True) + # recent postcards across all profiles (last 8), sorted by most recently updated + all_cards.sort(key=lambda c: c.updated_at or c.created_at, reverse=True) recent = all_cards[:8] # status distribution for progress bar