Fix bookmarks admin dashboard counts to include bookmarks that were deleted

This commit is contained in:
Neil Lalonde
2013-04-30 12:52:12 -04:00
parent 6f0d68fe5f
commit 20d73a4151
2 changed files with 4 additions and 4 deletions

View File

@ -118,7 +118,7 @@ class Report
PostAction.count_per_day_for_type(30, post_action_type).each do |date, count|
report.data << {x: date, y: count}
end
query = PostAction.where(post_action_type_id: post_action_type)
query = PostAction.unscoped.where(post_action_type_id: post_action_type)
report.total = query.count
report.prev30Days = query.where('created_at > ? and created_at < ?', 60.days.ago, 30.days.ago).count
end