Fixed error if no geo location backend is selected.

This commit is contained in:
Martin Edenhofer 2016-01-14 10:39:52 +01:00
parent b0af4f85ee
commit 92c0cb9da8
6 changed files with 14 additions and 10 deletions

View file

@ -23,7 +23,10 @@ store device for user
# get location info
location_details = Service::GeoIp.location(ip)
location = 'unknown'
if location_details
location = location_details['country_name']
end
# find device by fingerprint
if fingerprint

View file

@ -20,6 +20,7 @@ returns
def load_adapter_by_setting(setting)
adapter = Setting.get(setting)
return if !adapter
return if adapter.empty?
# load backend
load_adapter(adapter)