FIX: Apply `min_score_default_visibility` to reviewable topics list

This commit is contained in:
Robin Ward 2019-03-29 15:34:43 -04:00
parent 4e6d4531e8
commit 86349abfea
1 changed files with 4 additions and 1 deletions

View File

@ -61,7 +61,10 @@ class ReviewablesController < ApplicationController
# topics isn't indexed on `reviewable_score` and doesn't know what the current user can see,
# so let's query from the inside out.
Reviewable.viewable_by(current_user).pending.each do |r|
pending = Reviewable.viewable_by(current_user).pending
pending = pending.where("score >= ?", SiteSetting.min_score_default_visibility)
pending.each do |r|
topic_ids << r.topic_id
meta = stats[r.topic_id] ||= { count: 0, unique_users: 0 }