From: Tom Hughes Date: Wed, 11 Jan 2017 21:11:37 +0000 (+0000) Subject: Don't try and look up traces until the user is logged in X-Git-Tag: live~3744 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/96c91757fc23023f2d56019252a9f89f2482266f?ds=sidebyside;hp=3f59e829264f2f1b4897c6d2c1bd93abe8f52c24 Don't try and look up traces until the user is logged in Fixes #1411 --- diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 5d35b9979..aa284ecdc 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -84,7 +84,7 @@ class SiteController < ApplicationController @lat = note.lat @lon = note.lon @zoom = 17 - elsif params[:gpx] + elsif params[:gpx] && @user trace = Trace.visible_to(@user).find(params[:gpx]) @lat = trace.latitude @lon = trace.longitude