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