diff --git a/model.py b/model.py index 78b7340..8af4b0a 100644 --- a/model.py +++ b/model.py @@ -225,4 +225,4 @@ class MastodonInstance(db.Model): popularity = db.Column(db.Float, server_default='10', nullable=False) def bump(self): - self.popularity = self.popularity + 1 + self.popularity = (self.popularity or 10) + 1 diff --git a/routes.py b/routes.py index d7722d4..4d421b0 100644 --- a/routes.py +++ b/routes.py @@ -217,7 +217,6 @@ def api_viewer_timers(): @app.route('/login/mastodon', methods=('GET', 'POST')) def mastodon_login_step1(): - instances = MastodonInstance.query.filter(MastodonInstance.popularity > 1).order_by(db.desc(MastodonInstance.popularity)).limit(16) if request.method == 'GET':