From: Tom Hughes Date: Thu, 23 Jun 2011 13:15:55 +0000 (+0100) Subject: Don't try and update the session when we have no database X-Git-Tag: live~6273 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/2bd592498f2cce965d685fe55f46c8a226190a79 Don't try and update the session when we have no database --- diff --git a/app/views/site/index.html.erb b/app/views/site/index.html.erb index 0a0b7c1da..71567b2c5 100644 --- a/app/views/site/index.html.erb +++ b/app/views/site/index.html.erb @@ -95,7 +95,9 @@ elsif @user and !@user.home_lon.nil? and !@user.home_lat.nil? lat = @user.home_lat zoom = '10' else - session[:location] = OSM::IPLocation(request.env['REMOTE_ADDR']) unless session[:location] + unless STATUS == :database_readonly or STATUS == :database_offline + session[:location] = OSM::IPLocation(request.env['REMOTE_ADDR']) unless session[:location] + end if session[:location] bbox = true