refactor(siret): remove preview special case
This commit is contained in:
parent
5c77bc139a
commit
669b3ce5c3
1 changed files with 4 additions and 6 deletions
|
@ -45,11 +45,9 @@ class Champs::SiretController < ApplicationController
|
|||
end
|
||||
|
||||
def find_etablisement
|
||||
if params[:champ_id].present?
|
||||
@champ = policy_scope(Champ).find(params[:champ_id])
|
||||
@etablissement = @champ&.etablissement
|
||||
end
|
||||
@procedure_id = @champ&.dossier&.procedure&.id || 'aperçu'
|
||||
@champ = policy_scope(Champ).find(params[:champ_id])
|
||||
@etablissement = @champ.etablissement
|
||||
@procedure_id = @champ.dossier.procedure.id
|
||||
end
|
||||
|
||||
def find_etablissement_with_siret
|
||||
|
@ -57,7 +55,7 @@ class Champs::SiretController < ApplicationController
|
|||
end
|
||||
|
||||
def clear_siret_and_etablissement
|
||||
@champ&.update!(value: '')
|
||||
@champ.update!(value: '')
|
||||
@etablissement&.destroy
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue