X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/85b17a1f2a69784fc85fb0101fd339cdcfdad105..6cd694431ed325ce2013e9732b640234610271cc:/app/controllers/api/traces_controller.rb 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