Skip to content

Commit

Permalink
Don't try and look up traces until the user is logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Jan 11, 2017
1 parent 3f59e82 commit 96c9175
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/site_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def edit
@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
Expand Down

0 comments on commit 96c9175

Please sign in to comment.