From effe4d1381b6e7eee80c2eda822e65c14beac8c9 Mon Sep 17 00:00:00 2001 From: codl Date: Thu, 24 Aug 2017 14:49:20 +0200 Subject: [PATCH] mastodon instances: make order deterministic --- routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes.py b/routes.py index 86d7236..56c37d0 100644 --- a/routes.py +++ b/routes.py @@ -60,7 +60,7 @@ def index(): settings_error = 'settings_error' in request.args ) else: - instances = MastodonInstance.query.filter(MastodonInstance.popularity > 13).order_by(db.desc(MastodonInstance.popularity)).limit(5) + instances = MastodonInstance.query.filter(MastodonInstance.popularity > 13).order_by(db.desc(MastodonInstance.popularity), MastodonInstance.instance).limit(5) return render_template('index.html', mastodon_instances = instances, twitter_login_error = 'twitter_login_error' in request.args) @@ -219,7 +219,7 @@ def api_viewer_timers(): @app.route('/login/mastodon', methods=('GET', 'POST')) def mastodon_login_step1(instance=None): - instances = MastodonInstance.query.filter(MastodonInstance.popularity > 1).order_by(db.desc(MastodonInstance.popularity)).limit(30) + instances = MastodonInstance.query.filter(MastodonInstance.popularity > 1).order_by(db.desc(MastodonInstance.popularity), MastodonInstance.instance).limit(30) instance_url = request.args.get('instance_url', None) or request.form.get('instance_url', None)