Merge pull request #5989 from tchak/improuve-geometry-after-party

After_party : correction de la tâche `remove_invalid_geometries after_party`, qui échouait après une heure (#5989)
This commit is contained in:
Pierre de La Morinerie 2021-03-16 18:32:16 +01:00 committed by GitHub
commit 02f313c204
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@ namespace :after_party do
task remove_invalid_geometries: :environment do
puts "Running deploy task 'remove_invalid_geometries'"
geo_areas = GeoArea.where(source: :selection_utilisateur)
geo_areas = GeoArea.where(source: :selection_utilisateur).includes(champ: [:geo_areas, :type_de_champ])
progress = ProgressReport.new(geo_areas.count)
geo_areas.find_each do |geo_area|
if !geo_area.valid?