From 0a9545d415b6ed31682910ceb42328f9b78af4ae Mon Sep 17 00:00:00 2001 From: Nguyen Ngo Date: Wed, 24 Jun 2026 18:01:18 -0400 Subject: [PATCH] Jun 24 - Implement devices tracker - Fix 500 error --- app/routes/devices.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/routes/devices.py b/app/routes/devices.py index 92267f5..33385e6 100644 --- a/app/routes/devices.py +++ b/app/routes/devices.py @@ -25,7 +25,7 @@ def index(): """Show all registered devices, most-recently-seen first.""" devices = ( DeviceToken.query - .order_by(DeviceToken.last_seen_at.desc().nullslast()) + .order_by(DeviceToken.registered_at.desc()) .all() ) return render_template('admin/devices.html', devices=devices) @@ -96,4 +96,4 @@ def notify_update(): f'Update notice sent to {notified} user(s) on {len(outdated)} outdated device(s).', 'success' ) - return redirect(url_for('devices.index')) + return redirect(url_for('devices.index')) \ No newline at end of file