Remove skip_fetch_data mechanism

This commit is contained in:
Damien Le Thiec 2022-10-11 11:52:59 +02:00
parent 927edb5809
commit bcdc9c18ae
4 changed files with 12 additions and 16 deletions

View file

@ -7,10 +7,10 @@ class Champs::RNAController < ApplicationController
@network_error = false
begin
data = APIEntreprise::RNAAdapter.new(@rna, @champ.procedure_id).to_params
@champ.update!(data: data, value: @rna, skip_cleanup: true, skip_fetch: true)
@champ.update!(data: data, value: @rna, skip_cleanup: true)
rescue APIEntreprise::API::Error, ActiveRecord::RecordInvalid => error
@network_error = true if error.try(:network_error?) && !APIEntrepriseService.api_up?
@champ.update(data: nil, value: nil, skip_cleanup: true, skip_fetch: true)
@champ.update(data: nil, value: nil, skip_cleanup: true)
end
end
end