Throw an exception if saving the imported trace fails.
authorTom Hughes <tom@compton.nu>
Sun, 19 Aug 2007 09:11:59 +0000 (09:11 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 19 Aug 2007 09:11:59 +0000 (09:11 +0000)
app/models/trace.rb

index 3eefc185d400c265f1cce211cb4e9b593555d07a..7d4f01dad344b8ad503d5920b4374faa793b3f4b 100644 (file)
@@ -211,7 +211,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}"