Skip to content

Commit 26a0c96

Browse files
committed
Remove irrelevant code.
Appears to be copied from another lookup. Will not work with :ipgeolocation.
1 parent c8b1d48 commit 26a0c96

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lib/geocoder/lookups/ipgeolocation.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,7 @@ def query_url_params(query)
3737
def results(query)
3838
# don't look up a loopback or private address, just return the stored result
3939
return [reserved_result(query.text)] if query.internal_ip_address?
40-
return [] unless doc = fetch_data(query)
41-
if error = doc['error']
42-
code = error['code']
43-
msg = error['info']
44-
raise_error(ERROR_CODES[code], msg ) || Geocoder.log(:warn, "Ipgeolocation Geocoding API error: #{msg}")
45-
return []
46-
end
47-
[doc]
40+
[fetch_data(query)]
4841
end
4942

5043
def reserved_result(ip)

0 commit comments

Comments
 (0)