mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 20:08:26 +00:00
FIX: export admin reports to csv would have 0 rows in the csv file
This commit is contained in:
parent
dbadebacd1
commit
b35960fc35
@ -142,10 +142,10 @@ module Jobs
|
|||||||
def report_export
|
def report_export
|
||||||
return enum_for(:report_export) unless block_given?
|
return enum_for(:report_export) unless block_given?
|
||||||
|
|
||||||
@extra[:start_date] = @extra[:start_date].to_date if @extra[:start_date].is_a?(String)
|
@extra[:start_date] = @extra[:start_date].to_date if @extra[:start_date].is_a?(String)
|
||||||
@extra[:end_date] = @extra[:end_date].to_date if @extra[:end_date].is_a?(String)
|
@extra[:end_date] = @extra[:end_date].to_date if @extra[:end_date].is_a?(String)
|
||||||
@extra[:category_id] = @extra[:category_id].to_i if @extra[:category_id]
|
@extra[:category_id] = @extra[:category_id].present? ? @extra[:category_id].to_i : nil
|
||||||
@extra[:group_id] = @extra[:group_id].to_i if @extra[:group_id]
|
@extra[:group_id] = @extra[:group_id].present? ? @extra[:group_id].to_i : nil
|
||||||
Report.find(@extra[:name], @extra).data.each do |row|
|
Report.find(@extra[:name], @extra).data.each do |row|
|
||||||
yield [row[:x].to_s(:db), row[:y].to_s(:db)]
|
yield [row[:x].to_s(:db), row[:y].to_s(:db)]
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user