Merge pull request #8340 from mfo/US/fix-champs-pays

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:
mfo 2022-12-28 09:51:18 +01:00 committed by GitHub
commit 1f5db1faf2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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