models: ensure Champs::Pays#to_s is always a string
Before this, the result of `Champs::Pays#to_s` could be `nil`, which would break various things (like the PDF rendering of these champs).
This commit is contained in:
parent
8adbebb525
commit
905fca0bd3
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@
|
|||
class Champs::PaysChamp < Champs::TextChamp
|
||||
def localized_value
|
||||
if external_id
|
||||
I18nData.countries(I18n.locale)[external_id]
|
||||
I18nData.countries(I18n.locale)[external_id].to_s
|
||||
else
|
||||
value.present? ? value.to_s : ''
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue