app/queries/decidim/surveys/metrics/answers_metric_manage.rb in decidim-surveys-0.18.1 vs app/queries/decidim/surveys/metrics/answers_metric_manage.rb in decidim-surveys-0.19.0
- old
+ new
@@ -13,9 +13,10 @@
@registry = []
query.each do |key, results|
cumulative_value = results[:cumulative]
next if cumulative_value.zero?
+
quantity_value = results[:quantity] || 0
space_type, space_id, survey_id = key
record = Decidim::Metric.find_or_initialize_by(day: @day.to_s, metric_type: @metric_name,
organization: @organization, decidim_category_id: nil,
participatory_space_type: space_type, participatory_space_id: space_id,