diff --git a/app/views/spaces/index/search_form_fields/_filter_on_location.html.erb b/app/views/spaces/index/search_form_fields/_filter_on_location.html.erb index 44288aaa..c41ec75b 100644 --- a/app/views/spaces/index/search_form_fields/_filter_on_location.html.erb +++ b/app/views/spaces/index/search_form_fields/_filter_on_location.html.erb @@ -13,7 +13,7 @@ <%= t("space_filter.filter_by_map_bounds") %> <% end %>
- <% Fylke.includes(:kommuner).all.each do |fylke| %> + <% Fylke.includes(:kommuner).each do |fylke| %>
<% end %> + <% next if fylke.kommuner.empty? %> +