]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/trace.rb
Split the createuniquenodes query in two as MySQL was choosing a very
[rails.git] / app / models / trace.rb
index 3eefc185d400c265f1cce211cb4e9b593555d07a..c189c035ec8fb3e4812c52d2d07d659c9a615b92 100644 (file)
@@ -3,7 +3,6 @@ class Trace < ActiveRecord::Base
 
   validates_presence_of :user_id, :name, :timestamp
   validates_presence_of :description, :on => :create
-  validates_format_of :tagstring, :with => /^[^\/;.,?]*$/
 #  validates_numericality_of :latitude, :longitude
   validates_inclusion_of :public, :inserted, :in => [ true, false]
   
@@ -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}"