sentry(3830513995): champs pays peut avoir un external_id a '', test la presence d'external_id sinon on peut renvoyer du nil via Champs::PaysChamp.name

This commit is contained in:
Martin 2022-12-27 16:28:34 +01:00
parent 72791bd5b6
commit a2d3ec7a21

View file

@ -55,7 +55,7 @@ class Champs::PaysChamp < Champs::TextChamp
end
def name
if external_id
if external_id.present?
APIGeoService.country_name(external_id)
else
value.present? ? value.to_s : ''