Merge pull request #7039 from adullact/fix/7038-after-party-geo-area

Échec de la tâche AfterParty fix_geo_areas_geometry
This commit is contained in:
mfo 2022-03-17 10:14:31 +01:00 committed by GitHub
commit 18d1e5cad8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,7 +18,7 @@ namespace :after_party do
geometry_collections.find_each do |geometry_collection|
geometry_collection.geometry['geometries'].each do |geometry|
if valid_geometry?(geometry)
geometry_collection.champ.geo_areas.create!(geometry: geometry, source: 'selection_utilisateur')
geometry_collection.champ.geo_areas.find_or_create_by!(geometry: geometry, source: 'selection_utilisateur')
end
end
@ -36,7 +36,7 @@ namespace :after_party do
}
if valid_geometry?(geometry)
multi_line_string.champ.geo_areas.create!(geometry: geometry, source: 'selection_utilisateur')
multi_line_string.champ.geo_areas.find_or_create_by!(geometry: geometry, source: 'selection_utilisateur')
end
end
@ -54,7 +54,7 @@ namespace :after_party do
}
if valid_geometry?(geometry)
multi_polygon.champ.geo_areas.create!(geometry: geometry, source: 'selection_utilisateur')
multi_polygon.champ.geo_areas.find_or_create_by!(geometry: geometry, source: 'selection_utilisateur')
end
end