Merge pull request #5475 from betagouv/api-entreprise-raise

Sauvegarder un établissement invalide remonte maintenant une erreur
This commit is contained in:
Pierre de La Morinerie 2020-08-18 15:07:40 +02:00 committed by GitHub
commit 31dfdbf993
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,7 @@ class ApiEntrepriseService
return nil if etablissement_params.empty? return nil if etablissement_params.empty?
etablissement = dossier_or_champ.build_etablissement(etablissement_params) etablissement = dossier_or_champ.build_etablissement(etablissement_params)
etablissement.save etablissement.save!
[ [
ApiEntreprise::EntrepriseJob, ApiEntreprise::AssociationJob, ApiEntreprise::ExercicesJob, ApiEntreprise::EntrepriseJob, ApiEntreprise::AssociationJob, ApiEntreprise::ExercicesJob,