Build instead of create etablissement
This commit is contained in:
parent
19b58a298c
commit
6ef141b014
1 changed files with 1 additions and 1 deletions
|
@ -110,7 +110,7 @@ class Users::DossiersController < UsersController
|
||||||
|
|
||||||
if etablissement_attributes.present?
|
if etablissement_attributes.present?
|
||||||
etablissement_attributes = ActionController::Parameters.new(etablissement_attributes).permit!
|
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
|
if etablissement.save
|
||||||
Rails.logger.info("etablissement saved, siret: #{siret}, id: #{etablissement.id}")
|
Rails.logger.info("etablissement saved, siret: #{siret}, id: #{etablissement.id}")
|
||||||
@facade.dossier.mandataire_social!(current_user.france_connect_information)
|
@facade.dossier.mandataire_social!(current_user.france_connect_information)
|
||||||
|
|
Loading…
Reference in a new issue