Expose multiple user selections on champ carte
This commit is contained in:
parent
55e99a323c
commit
22604013d0
14 changed files with 230 additions and 245 deletions
|
@ -38,11 +38,12 @@ class DossierSerializer < ActiveModel::Serializer
|
|||
end
|
||||
|
||||
if champ_carte.present?
|
||||
carto_champs = champ_carte.geo_areas.to_a
|
||||
if !carto_champs.find(&:selection_utilisateur?)
|
||||
carto_champs << champ_carte.user_geo_area
|
||||
champs_geo_areas = geo_areas.filter do |geo_area|
|
||||
geo_area.source != GeoArea.sources.fetch(:selection_utilisateur)
|
||||
end
|
||||
champs += carto_champs.compact
|
||||
champs_geo_areas << champ_carte.selection_utilisateur_legacy_geo_area
|
||||
|
||||
champs += champs_geo_areas.compact
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue