diff --git a/files/routes/search.py b/files/routes/search.py index 3d58ea64f..7ac7477bb 100644 --- a/files/routes/search.py +++ b/files/routes/search.py @@ -58,7 +58,7 @@ def searchposts(v): - posts = g.db.query(Submission).options(lazyload('*')) + posts = g.db.query(Submission.id).options(lazyload('*')) if not (v and v.admin_level == 6): posts = posts.filter(Submission.private == False) @@ -153,7 +153,7 @@ def searchposts(v): total = len(posts) - ids = [x.id for x in posts] + ids = [x[0] for x in posts] diff --git a/files/templates/comments.html b/files/templates/comments.html index b4e2e487f..1804f5152 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -139,7 +139,7 @@ {% if last_view_utc and c.created_utc > last_view_utc and not (v and v.id==c.author_id) and (not v or v.highlightcomments) %}{% endif %} {% if c.awards %} - {% for a in c.awards[:5] %} + {% for a in c.awards %} {% endfor %} {% endif %} diff --git a/files/templates/submission.html b/files/templates/submission.html index 0ea060db0..323fe7973 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -213,13 +213,12 @@ {% if p.award_count("shit") %} {% set minbugs = 10*p.award_count("shit") if p.award_count("shit") <= 5 else 50 %} - {% set maxbugs = 20*p.award_count("shit") if p.award_count("shit") <= 5 else 100 %} @@ -229,13 +228,12 @@ {% if p.award_count("fireflies") %} {% set minbugs = 10*p.award_count("fireflies") if p.award_count("fireflies") <= 5 else 50 %} - {% set maxbugs = 20*p.award_count("fireflies") if p.award_count("fireflies") <= 5 else 100 %} @@ -262,7 +260,7 @@ {% endif %} {% if p.awards %} - {% for a in p.awards[:5] %} + {% for a in p.awards %} {% endfor %} {% endif %} diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index a382feb7e..284d2b246 100644 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -118,8 +118,8 @@ {% endif %} {% if p.awards %} - {% for a in p.awards[:5] %} - + {% for a in p.awards %} + {% endfor %} {% endif %} {% if v and v.admin_level==6 and p.author.shadowbanned %}{% endif %}