diff options
author | Dan McGee <dan@archlinux.org> | 2011-06-28 00:11:49 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-28 00:11:49 -0500 |
commit | f913bbcab4dc458d1566778a094bdd337cb91841 (patch) | |
tree | 416216e3ac147626639f6814cc71b3cd9c0aade6 /devel/utils.py | |
parent | 8734d6ccdf10fd03ed3dfea5fb1028812d0ba8cd (diff) |
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>
Diffstat (limited to 'devel/utils.py')
-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 6bc52c89..d7a154a8 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: |