From b3f9bc4c973c9598c0412802054fef4adb019c76 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 18 Mar 2015 02:03:08 +0100 Subject: [PATCH] fireinfo: Fix language map --- webapp/backend/fireinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.47.3