From 03a72ccf063c8444896d5ca10b354a24ebbf42a8 Mon Sep 17 00:00:00 2001 From: mfo Date: Mon, 26 Aug 2024 10:10:34 +0200 Subject: [PATCH] fix(PopulateSiretValueJSONTask): some bad data prevent the task to finish --- app/tasks/maintenance/populate_siret_value_json_task.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/tasks/maintenance/populate_siret_value_json_task.rb b/app/tasks/maintenance/populate_siret_value_json_task.rb index e3f6eacace6..3b43ebb7391 100644 --- a/app/tasks/maintenance/populate_siret_value_json_task.rb +++ b/app/tasks/maintenance/populate_siret_value_json_task.rb @@ -13,6 +13,8 @@ def collection def process(champ) return if champ.etablissement.blank? champ.update!(value_json: APIGeoService.parse_etablissement_address(champ.etablissement)) + rescue ActiveRecord::RecordInvalid + # noop, just a champ without dossier end def count