Skip to content

Commit d1dd945

Browse files
authored
OTWO-7396 Fix missing method for project comparison (#1814)
1 parent 0c437c6 commit d1dd945

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/controllers/compares_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def setup_header
5757
end
5858

5959
def metric_data(metric_name, project)
60+
return [] unless metric_name
61+
6062
data = project.best_analysis.send("#{metric_name}_history".to_sym, @start_date, @end_date)
6163
data.map do |values|
6264
metric_name == 'code_total' ? values['code_total'].to_i : values[metric_name.pluralize.to_s].to_i

0 commit comments

Comments
 (0)