mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 04:03:57 -06:00
FIX: makes report description optional
This commit is contained in:
parent
83255d94d9
commit
34dbb32df4
@ -35,12 +35,14 @@ class Report
|
||||
end
|
||||
|
||||
def as_json(options = nil)
|
||||
description = I18n.t("reports.#{type}.description", default: "")
|
||||
|
||||
{
|
||||
type: type,
|
||||
title: I18n.t("reports.#{type}.title"),
|
||||
xaxis: I18n.t("reports.#{type}.xaxis"),
|
||||
yaxis: I18n.t("reports.#{type}.yaxis"),
|
||||
description: I18n.t("reports.#{type}.description"),
|
||||
description: description.presence ? description : nil,
|
||||
data: data,
|
||||
start_date: start_date&.iso8601,
|
||||
end_date: end_date&.iso8601,
|
||||
|
Loading…
Reference in New Issue
Block a user