X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/64146b4f3614854e6a0f8430f27261fe0a0ca26c..de29e9b3f59d7a06fbe2e32096328bd8a6ed2b3a:/app/models/trace.rb?ds=sidebyside diff --git a/app/models/trace.rb b/app/models/trace.rb index 91492404b..5096a81aa 100644 --- a/app/models/trace.rb +++ b/app/models/trace.rb @@ -306,7 +306,7 @@ class Trace < ActiveRecord::Base tp.save! end - if gpx.actual_points > 0 + if gpx.actual_points.positive? max_lat = Tracepoint.where(:gpx_id => id).maximum(:latitude) min_lat = Tracepoint.where(:gpx_id => id).minimum(:latitude) max_lon = Tracepoint.where(:gpx_id => id).maximum(:longitude)