make sure we do not count system user's posts

This commit is contained in:
Régis Hanol 2014-01-03 17:27:55 +01:00
parent 2cecc0b21f
commit fd36fa1c2f

View file

@ -42,6 +42,7 @@ class TopTopic < ActiveRecord::Base
AND p.deleted_at IS NULL
AND NOT p.hidden
AND post_type = #{Post.types[:regular]}
AND user_id <> #{Discourse.system_user.id}
GROUP BY topic_id"
TopTopic.update_top_topics(period, "posts", sql)