Build instead of create etablissement

This commit is contained in:
Paul Chavard 2018-03-07 17:43:44 +01:00
parent 19b58a298c
commit 6ef141b014

View file

@ -110,7 +110,7 @@ class Users::DossiersController < UsersController
if etablissement_attributes.present?
etablissement_attributes = ActionController::Parameters.new(etablissement_attributes).permit!
etablissement = @facade.dossier.create_etablissement(etablissement_attributes)
etablissement = @facade.dossier.build_etablissement(etablissement_attributes)
if etablissement.save
Rails.logger.info("etablissement saved, siret: #{siret}, id: #{etablissement.id}")
@facade.dossier.mandataire_social!(current_user.france_connect_information)