mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 10:52:45 +08:00
don't fail this query cause avg_time is 0
This commit is contained in:
parent
e77c396a19
commit
7681ba0c32
|
@ -298,6 +298,7 @@ class Topic < ActiveRecord::Base
|
|||
FROM (SELECT topic_id,
|
||||
round(exp(avg(ln(avg_time)))) AS gmean
|
||||
FROM posts
|
||||
WHERE avg_time > 0 AND avg_time IS NOT NULL
|
||||
GROUP BY topic_id) AS x
|
||||
WHERE x.topic_id = topics.id")
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user