[odrs-web] trivial: Fix the moderator queue



commit a4269321da1ab389a9859d79bd482282e5bf4d17
Author: Richard Hughes <richard hughsie com>
Date:   Fri Jul 7 22:12:32 2017 +0100

    trivial: Fix the moderator queue

 app/views_admin.py |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/app/views_admin.py b/app/views_admin.py
index 88e967a..c63b72d 100644
--- a/app/views_admin.py
+++ b/app/views_admin.py
@@ -409,15 +409,11 @@ def admin_show_unmoderated():
     """
     Return all the reviews on the server as HTML.
     """
-
     try:
         db = get_db()
         reviews_all = db.reviews.get_all()
     except CursorError as e:
         return _error_internal(str(e))
-    if not reviews_all and page != 1:
-        abort(404)
-
     user_hash = _get_hash_for_user(current_user)
     if not user_hash:
         return _error_internal('no user_hash...')
@@ -431,7 +427,7 @@ def admin_show_unmoderated():
             continue
         if db.reviews.vote_exists(r.review_id, user_hash):
             continue
-        if len(reviews_all) > 20:
+        if len(reviews) > 20:
             break
         reviews.append(r)
     return render_template('show-all.html',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]