]> git.ipfire.org Git - ipfire.org.git/blobdiff - www/webapp/backend/geoip.py
geoip: Don't lookup "nothing" in the database.
[ipfire.org.git] / www / webapp / backend / geoip.py
index 767488b06363dc633a51b5af502b209332bbc485..43f92da3acf57d59dff1b65eaa7ca489f3973327 100644 (file)
@@ -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 \