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
This commit is contained in:
parent
c775e88c0e
commit
2739f41fb3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue