]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/trace.rb
Add extra validation to messages and diary entries.
[rails.git] / app / models / trace.rb
index 8f99e7bd8cb57bfc35954a5e8b687638d7cd0beb..c189c035ec8fb3e4812c52d2d07d659c9a615b92 100644 (file)
@@ -188,7 +188,6 @@ class Trace < ActiveRecord::Base
         tp.lng = point['longitude'].to_f
         tp.altitude = point['altitude'].to_f
         tp.timestamp = point['timestamp']
-        tp.user_id = user.id
         tp.gpx_id = id
         tp.trackid = point['segment'].to_i
         tp.save!
@@ -211,7 +210,7 @@ class Trace < ActiveRecord::Base
         self.icon_picture = gpx.get_icon(min_lat, min_lon, max_lat, max_lon)
         self.size = gpx.actual_points
         self.inserted = true
-        self.save
+        self.save!
       end
 
       logger.info "done trace #{id}"