From 7d4c748432eb62d011073c8264f67b39981be456 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Thu, 13 Aug 2020 11:53:32 +0200 Subject: [PATCH] services: make etablissement save raise on error Before, if saving the etablissement failed, the error would be ignored silently. --- app/services/api_entreprise_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/api_entreprise_service.rb b/app/services/api_entreprise_service.rb index 0df25fcce..1fd4130db 100644 --- a/app/services/api_entreprise_service.rb +++ b/app/services/api_entreprise_service.rb @@ -12,7 +12,7 @@ class ApiEntrepriseService return nil if etablissement_params.empty? etablissement = dossier_or_champ.build_etablissement(etablissement_params) - etablissement.save + etablissement.save! [ ApiEntreprise::EntrepriseJob, ApiEntreprise::AssociationJob, ApiEntreprise::ExercicesJob,