From: Michael Tremer Date: Sat, 5 Jan 2013 13:21:04 +0000 (+0100) Subject: geoip: Don't lookup "nothing" in the database. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3d0049b39f23fc7be7279f2a44e7594c532ee494;p=ipfire.org.git geoip: Don't lookup "nothing" in the database. --- diff --git a/www/webapp/backend/geoip.py b/www/webapp/backend/geoip.py index 767488b0..43f92da3 100644 --- a/www/webapp/backend/geoip.py +++ b/www/webapp/backend/geoip.py @@ -44,6 +44,8 @@ class GeoIP(object): def get_all(self, addr): addr = self._encode_ip(addr) + if not addr: + return ret = self.db.get("SELECT locations.* FROM addresses \ JOIN locations ON locations.id = addresses.location \