Return empty strings for incomplete api entreprise adresses

This commit is contained in:
Paul Chavard 2021-03-17 11:52:53 +01:00
parent aabf28fa0c
commit e96d2fb083

View file

@ -108,9 +108,9 @@ module Types
street_number: object.numero_voie, street_number: object.numero_voie,
street_name: object.nom_voie, street_name: object.nom_voie,
street_address: object.nom_voie.present? ? [object.numero_voie, object.type_voie, object.nom_voie].compact.join(' ') : nil, street_address: object.nom_voie.present? ? [object.numero_voie, object.type_voie, object.nom_voie].compact.join(' ') : nil,
postal_code: object.code_postal, postal_code: object.code_postal.presence || '',
city_name: object.localite, city_name: object.localite.presence || '',
city_code: object.code_insee_localite city_code: object.code_insee_localite.presence || ''
} }
end end