Revert "Merge pull request #10082 from tchak/fix-address-city_name"
This reverts commit3febf1bafd
, reversing changes made to6ec7a87bcb
.
This commit is contained in:
parent
14266232a4
commit
5b9276e1ba
1 changed files with 0 additions and 24 deletions
|
@ -25,29 +25,5 @@ module Types
|
||||||
field :region_code, String, "n° de region", null: true
|
field :region_code, String, "n° de region", null: true
|
||||||
|
|
||||||
field :geometry, Types::GeoJSON, "coordonnées géographique", null: true
|
field :geometry, Types::GeoJSON, "coordonnées géographique", null: true
|
||||||
|
|
||||||
def city_name
|
|
||||||
if object[:departement_code].present? && object[:city_code].present?
|
|
||||||
APIGeoService.commune_name(object.fetch(:departement_code), object.fetch(:city_code))
|
|
||||||
else
|
|
||||||
object[:city_name]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def departement_name
|
|
||||||
if object[:departement_code].present?
|
|
||||||
APIGeoService.departement_name(object.fetch(:departement_code))
|
|
||||||
else
|
|
||||||
object[:departement_name]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def region_name
|
|
||||||
if object[:region_code].present?
|
|
||||||
APIGeoService.region_name(object.fetch(:region_code))
|
|
||||||
else
|
|
||||||
object[:region_name]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue