Don't try and look up traces until the user is logged in

Fixes #1411
This commit is contained in:
Tom Hughes 2017-01-11 21:11:37 +00:00
parent 3f59e82926
commit 96c91757fc

View file

@ -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