summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-28 07:11:49 +0200
committerDan McGee <dan@archlinux.org>2011-06-28 07:11:49 +0200
commitf913bbcab4dc458d1566778a094bdd337cb91841 (patch)
tree416216e3ac147626639f6814cc71b3cd9c0aade6
parent8734d6ccdf10fd03ed3dfea5fb1028812d0ba8cd (diff)
downloadarchweb-f913bbcab4dc458d1566778a094bdd337cb91841.tar.gz
archweb-f913bbcab4dc458d1566778a094bdd337cb91841.tar.xz
Add order_by to packager count query
No real idea why SQLite is returning wrong results without out this, but it is likely a bug in the ORM layer I'm not interested in digging into. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--devel/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/devel/utils.py b/devel/utils.py
index 6bc52c8..d7a154a 100644
--- a/devel/utils.py
+++ b/devel/utils.py
@@ -32,8 +32,8 @@ SELECT pr.user_id, COUNT(*), COUNT(p.flag_date)
pkg_count[k] = total
flag_count[k] = flagged
- update_count = Package.objects.values_list('packager').annotate(
- Count('packager'))
+ update_count = Package.objects.values_list('packager').order_by(
+ 'packager').annotate(Count('packager'))
update_count = dict(update_count)
for m in maintainers: