From 96c91757fc23023f2d56019252a9f89f2482266f Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 11 Jan 2017 21:11:37 +0000 Subject: [PATCH 1/1] Don't try and look up traces until the user is logged in Fixes #1411 --- app/controllers/site_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.43.2