mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
Don't use bang save
This commit is contained in:
parent
f4605989b6
commit
b3e8155e43
1 changed files with 2 additions and 1 deletions
|
|
@ -71,11 +71,12 @@ module Tracks::TrackBuilder
|
|||
track.elevation_max = elevation_stats[:max]
|
||||
track.elevation_min = elevation_stats[:min]
|
||||
|
||||
if track.save!
|
||||
if track.save
|
||||
Point.where(id: points.map(&:id)).update_all(track_id: track.id)
|
||||
track
|
||||
else
|
||||
Rails.logger.error "Failed to create track for user #{user.id}: #{track.errors.full_messages.join(', ')}"
|
||||
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue