From: Michael Tremer Date: Wed, 18 Mar 2015 01:03:08 +0000 (+0100) Subject: fireinfo: Fix language map X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b3f9bc4c973c9598c0412802054fef4adb019c76;p=ipfire.org.git fireinfo: Fix language map --- diff --git a/webapp/backend/fireinfo.py b/webapp/backend/fireinfo.py index 6c5b3177..beeced8a 100644 --- a/webapp/backend/fireinfo.py +++ b/webapp/backend/fireinfo.py @@ -1668,7 +1668,7 @@ class Fireinfo(Object): return ((r.location, r.count) for r in res) def get_language_map(self, when=None): - res = self.db.query("WITH profiles AS (SELECT fireinfo_profiles_at(%s) AS id) \ + res = self.db.query("WITH profiles AS (SELECT fireinfo_profiles_with_data_at(%s) AS id) \ SELECT language, COUNT(language)::float / (SELECT COUNT(*) FROM profiles) AS count FROM profiles \ LEFT JOIN fireinfo_profiles_languages ON profiles.id = fireinfo_profiles_languages.profile_id \ WHERE fireinfo_profiles_languages.language IS NOT NULL GROUP BY language ORDER BY count DESC", when)