X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/144c48737b6669755850db8fbb08a351f615474e..0b05f4701672d7107cb45d9fb4de13819f7df863:/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