From 176149726e5292568bec9d0d02bf3370fa2fb7a3 Mon Sep 17 00:00:00 2001 From: Luc Donnet Date: Mon, 19 Mar 2018 15:31:17 +0100 Subject: Fix coordinates synchronization for reflex Refs #6245 --- lib/stif/reflex_synchronization.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/stif/reflex_synchronization.rb b/lib/stif/reflex_synchronization.rb index 202446da3..508d28b40 100644 --- a/lib/stif/reflex_synchronization.rb +++ b/lib/stif/reflex_synchronization.rb @@ -159,10 +159,13 @@ module Stif zip_code: 'PostalRegion', city_name: 'Town', stif_type: 'OBJECT_STATUS', - longitude: (entry['gml:pos'] && entry['gml:pos'][:lng]) ? entry['gml:pos'][:lng] : nil, - latitude: (entry['gml:pos'] && entry['gml:pos'][:lat]) ? entry['gml:pos'][:lat] : nil }.each do |k, v| stop[k] = entry[v] end + if entry['gml:pos'] + stop['longitude'] = entry['gml:pos'][:lng] + stop['latitude'] = entry['gml:pos'][:lat] + end + stop.kind = :commercial stop.deleted_at = nil stop.confirmed_at = Time.now if stop.new_record? -- cgit v1.2.3