diff --git a/lib/stats.rb b/lib/stats.rb index 925229ae..b1e3499a 100644 --- a/lib/stats.rb +++ b/lib/stats.rb @@ -13,7 +13,7 @@ def self.num_commits(since) end def self.num_unreviewed_commits(since) - Commit.filter("`commits`.`date` > ?", since). + Commit.filter("`commits`.`date` > ?", since).filter(:approved_by_user_id => nil). left_join(:comments, :commit_id => :commits__id).filter(:comments__id => nil).count end