X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d14e97e1be371286cb3860cadfa784aa05fd8c62..2b8798d769f273ae11b5da902c0879cbc15c0072:/app/controllers/api/traces_controller.rb?ds=sidebyside diff --git a/app/controllers/api/traces_controller.rb b/app/controllers/api/traces_controller.rb index 629617f0b..b66aead38 100644 --- a/app/controllers/api/traces_controller.rb +++ b/app/controllers/api/traces_controller.rb @@ -115,7 +115,7 @@ module Api trace.save! # Finally save the user's preferred privacy level - if pref = current_user.preferences.where(:k => "gps.trace.visibility").first + if pref = current_user.preferences.find_by(:k => "gps.trace.visibility") pref.v = visibility pref.save else