diff --git a/lib/prometheus/controller.rb b/lib/prometheus/controller.rb index d2d85767..5666fb4e 100644 --- a/lib/prometheus/controller.rb +++ b/lib/prometheus/controller.rb @@ -41,7 +41,7 @@ module Prometheus state: RequestForComment::SOLVED) # count of rfcs with comments - @rfc_commented_count.observe(RequestForComment.with_comments.count) + @rfc_commented_count.observe(RequestForComment.joins(:comments).distinct.count(:id)) end def update_notification(object)