mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 19:01:52 +08:00
topics with no reply data were strings
This commit is contained in:
parent
1e2e450772
commit
8e76e6e4b7
|
@ -114,7 +114,7 @@ class Report
|
|||
def self.report_topics_with_no_response(report)
|
||||
report.data = []
|
||||
Topic.with_no_response_per_day(report.start_date, report.end_date, report.category_id).each do |r|
|
||||
report.data << { x: Date.parse(r["date"]), y: r["count"] }
|
||||
report.data << { x: Date.parse(r["date"]), y: r["count"].to_i }
|
||||
end
|
||||
report.total = Topic.with_no_response_total(category_id: report.category_id)
|
||||
report.prev30Days = Topic.with_no_response_total(start_date: report.start_date - 30.days, end_date: report.start_date, category_id: report.category_id)
|
||||
|
|
|
@ -939,7 +939,7 @@ class Topic < ActiveRecord::Base
|
|||
builder.where("t.category_id = :category_id", category_id: opts[:category_id]) if opts[:category_id]
|
||||
builder.where("t.archetype <> '#{Archetype.private_message}'")
|
||||
builder.where("t.deleted_at IS NULL")
|
||||
builder.exec.first["count"]
|
||||
builder.exec.first["count"].to_i
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in New Issue
Block a user