demarches-normaliennes/app/jobs/champ_fetch_external_data_job.rb
2021-02-17 19:10:16 +01:00

11 lines
229 B
Ruby

class ChampFetchExternalDataJob < ApplicationJob
def perform(champ)
if champ.external_id.present?
data = champ.fetch_external_data
if data.present?
champ.update!(data: data)
end
end
end
end