Merge pull request #1770 from tchak/api-adapter-object
Give procedure_id to SIRETService
This commit is contained in:
commit
846a2db661
2 changed files with 2 additions and 4 deletions
|
@ -105,7 +105,7 @@ class Users::DossiersController < UsersController
|
|||
|
||||
update_current_user_siret!(siret)
|
||||
|
||||
etablissement_attributes = SIRETService.fetch(siret, @facade.dossier)
|
||||
etablissement_attributes = SIRETService.fetch(siret, @facade.dossier.procedure_id, @facade.dossier)
|
||||
|
||||
if etablissement_attributes.present?
|
||||
etablissement_attributes = ActionController::Parameters.new(etablissement_attributes).permit!
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
class SIRETService
|
||||
def self.fetch(siret, dossier = nil)
|
||||
procedure_id = dossier&.procedure_id
|
||||
|
||||
def self.fetch(siret, procedure_id, dossier = nil)
|
||||
etablissement_params = ApiEntreprise::EtablissementAdapter.new(siret, procedure_id).to_params
|
||||
entreprise_params = ApiEntreprise::EntrepriseAdapter.new(siret, procedure_id).to_params
|
||||
|
||||
|
|
Loading…
Reference in a new issue