From: Michael Tremer Date: Sun, 16 Jan 2011 12:18:58 +0000 (+0100) Subject: fireinfo: Fix geoip information. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5914104cabcf40373b222a284268c3152398d6a7;p=ipfire.org.git fireinfo: Fix geoip information. --- diff --git a/www/webapp/backend/stasy.py b/www/webapp/backend/stasy.py index 03abfc55..61b93a86 100644 --- a/www/webapp/backend/stasy.py +++ b/www/webapp/backend/stasy.py @@ -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):