From 5914104cabcf40373b222a284268c3152398d6a7 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 16 Jan 2011 13:18:58 +0100 Subject: [PATCH] fireinfo: Fix geoip information. --- www/webapp/backend/stasy.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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): -- 2.47.3