aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stif
diff options
context:
space:
mode:
authorXinhui2016-10-07 11:03:17 +0200
committerXinhui2016-10-07 11:03:17 +0200
commit3c61225461922bbb482795854cea8aadc8d61742 (patch)
treec7a9998f3cd0c2fc2018b96abdb92c2fb86a02a3 /lib/stif
parent71ee451d0d0f4dea8f0e7e96333b45d4f25aa81b (diff)
downloadchouette-core-3c61225461922bbb482795854cea8aadc8d61742.tar.bz2
Reflex:sync creation_time to changed condition
Diffstat (limited to 'lib/stif')
-rw-r--r--lib/stif/reflex_synchronization.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/stif/reflex_synchronization.rb b/lib/stif/reflex_synchronization.rb
index 471b226c2..dbd733e99 100644
--- a/lib/stif/reflex_synchronization.rb
+++ b/lib/stif/reflex_synchronization.rb
@@ -107,13 +107,14 @@ module Stif
stop.stop_area_referential = self.defaut_referential
{
:name => 'Name',
- :creation_time => 'created',
:area_type => 'type',
:object_version => 'version',
:zip_code => 'PostalRegion',
:city_name => 'Town'
}.each do |k, v| stop[k] = entry[v] end
+
if stop.changed?
+ stop.creation_time = entry[:created]
stop.import_xml = entry[:xml]
stop.save!
end