fix: graphql new normalization

This commit is contained in:
simon lehericey 2024-04-10 10:51:37 +02:00
parent 5567570d74
commit 344f0d2c80
No known key found for this signature in database
GPG key ID: CDE670D827C7B3C5

View file

@ -27,11 +27,11 @@ module Types
field :geometry, Types::GeoJSON, "coordonnées géographique", null: true
def city_name
if object['department_code'].present? && object['city_code'].present?
APIGeoService.commune_name(object.fetch('department_code'), object.fetch('city_code'))
else
APIGeoService.safely_normalize_city_name(
object['department_code'],
object['city_code'],
object['city_name']
end
)
end
def department_name