diff options
author | Dan McGee <dan@archlinux.org> | 2011-06-28 07:11:49 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-28 07:11:49 +0200 |
commit | f913bbcab4dc458d1566778a094bdd337cb91841 (patch) | |
tree | 416216e3ac147626639f6814cc71b3cd9c0aade6 | |
parent | 8734d6ccdf10fd03ed3dfea5fb1028812d0ba8cd (diff) | |
download | archweb-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.py | 4 |
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: |