From 3212bf762fc8fa152fd3323b0afaed103f68d728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Latinier?= Date: Thu, 27 Oct 2016 23:18:37 +0200 Subject: [PATCH] fix 500 error on pagination --- isso/views/comments.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/isso/views/comments.py b/isso/views/comments.py index df1eebe..7dfd423 100644 --- a/isso/views/comments.py +++ b/isso/views/comments.py @@ -519,9 +519,9 @@ class API(object): if not data or not data['logged']: return render_template('login.html') page_size = 100 - page = req.args.get('page', 0) + page = int(req.args.get('page', 0)) order_by = req.args.get('order_by', "id") - mode = req.args.get('mode', 2) + mode = int(req.args.get('mode', 2)) comments = self.comments.fetchall(mode=mode, page=page, limit=page_size, order_by=order_by)