Browse Source

feat: add bulk upload id to filter count, make nil safe

pull/1768/head
natdeanlewissoftwire 3 years ago
parent
commit
5494878cef
  1. 4
      app/helpers/filters_helper.rb

4
app/helpers/filters_helper.rb

@ -72,10 +72,12 @@ private
def filters_count(filters) def filters_count(filters)
filters.each.sum do |category, category_filters| filters.each.sum do |category, category_filters|
if %w[status years].include?(category) if %w[status years bulk_upload_id].include?(category)
category_filters.count(&:present?) category_filters.count(&:present?)
elsif %w[user organisation].include?(category) elsif %w[user organisation].include?(category)
category_filters != "all" ? 1 : 0 category_filters != "all" ? 1 : 0
else
0
end end
end end
end end

Loading…
Cancel
Save