front page mastodon buttons: sort mastodon.social first

This commit is contained in:
codl 2017-10-15 20:47:58 +02:00
parent 3d8c809e64
commit 81f3d5dff5
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
1 changed files with 2 additions and 1 deletions

View File

@ -37,7 +37,8 @@ def about():
instances = (
MastodonInstance.query
.filter(MastodonInstance.popularity > 5)
.order_by(db.desc(MastodonInstance.popularity),
.order_by(db.desc(MastodonInstance.instance == 'mastodon.social'),
db.desc(MastodonInstance.popularity),
MastodonInstance.instance)
.limit(5).all())
return render_template(