diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-02-13 18:42:49 +0300 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-02-28 13:46:20 +0300 |
commit | 41bb23ae1d61f1e94749a288d822c93b430ee9c8 (patch) | |
tree | b223c9dc24759599e46c649300be32739775a975 /app/serializers | |
parent | 4fcbcce36475067f4d72ebe9371634e31073a497 (diff) |
Restore memoization to base query and add a batch base query method
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/analytics_stage_entity.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/serializers/analytics_stage_entity.rb b/app/serializers/analytics_stage_entity.rb index 08fa8b83c24..f87eb78e0e8 100644 --- a/app/serializers/analytics_stage_entity.rb +++ b/app/serializers/analytics_stage_entity.rb @@ -7,6 +7,6 @@ class AnalyticsStageEntity < Grape::Entity expose :description expose :median, as: :value do |stage| - stage.median && !stage.median.blank? ? distance_of_time_in_words(stage.median) : nil + distance_of_time_in_words(stage.median) if stage.median && !(stage.median.blank? || stage.median.zero?) end end |