]> git.ipfire.org Git - ipfire.org.git/commitdiff
fireinfo: Fix geoip information.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 16 Jan 2011 12:18:58 +0000 (13:18 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 16 Jan 2011 12:20:09 +0000 (13:20 +0100)
www/webapp/backend/stasy.py

index 03abfc55d7733c7fd414ad1ced37caa46e8aefbe..61b93a86ebf9c903441cdaefac2fa782d3c709e8 100644 (file)
@@ -666,7 +666,7 @@ class Stasy(object):
 
        @property
        def geo_locations(self):
-               return [code.lower() for code in self.query({}).distinct("geoip.country_code")]
+               return [code.lower() for code in self.query({}, all=True).distinct("geoip.country_code")]
 
        def get_geo_location_map(self):
                geo_locations = {}
@@ -676,16 +676,10 @@ class Stasy(object):
                        geo_locations[geo_location] = \
                                self.query({
                                        "geoip.country_code" : geo_location.upper()
-                               }).count()
+                               }, all=True).count()
 
                        count += geo_locations[geo_location]
 
-               profiles_all = self.query({})
-
-               unknown_count = profiles_all.count() - count
-               if unknown_count:
-                       geo_locations["unknown"] = unknown_count
-
                return geo_locations
 
        def get_models_by_vendor(self, subsystem, vendor_id):