mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-03-29 08:09:55 -04:00
don't fail this query cause avg_time is 0
This commit is contained in:
parent
e77c396a19
commit
7681ba0c32
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue