summaryrefslogtreecommitdiff
path: root/app/serializers
diff options
context:
space:
mode:
authorMałgorzata Ksionek <meksionek@gmail.com>2019-05-20 23:09:48 +0200
committerMałgorzata Ksionek <meksionek@gmail.com>2019-05-21 10:33:58 +0200
commit2739f41fb39bb61aa8288dd3b0622e0ba715ba91 (patch)
tree639c753c583fb9d227b6d97762afc58f26af8612 /app/serializers
parentc775e88c0ec0e9916227a410cc09e2bbca4a92ce (diff)
downloadgitlab-ce-2739f41fb39bb61aa8288dd3b0622e0ba715ba91.tar.gz
Change to_i method to to_f method
In order to stop showing 'Not enough data' in cycle analytics view Remove puts from the file
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/analytics_stage_entity.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/serializers/analytics_stage_entity.rb b/app/serializers/analytics_stage_entity.rb
index ae7c20c3bba..ab3cf912695 100644
--- a/app/serializers/analytics_stage_entity.rb
+++ b/app/serializers/analytics_stage_entity.rb
@@ -9,7 +9,7 @@ class AnalyticsStageEntity < Grape::Entity
expose :description
expose :median, as: :value do |stage|
- # median returns a BatchLoader instance which we first have to unwrap by using to_i
- !stage.median.to_i.zero? ? distance_of_time_in_words(stage.median) : nil
+ # median returns a BatchLoader instance which we first have to unwrap by using to_f
+ !stage.median.to_f.zero? ? distance_of_time_in_words(stage.median) : nil
end
end