From cc72e64e19f57954f86e866d245aff9c52bde642 Mon Sep 17 00:00:00 2001 From: James Bennett Date: Sun, 28 Sep 2008 02:50:09 +0000 Subject: [PATCH] Fixed #9203: Restore correct ordering for LatestCommentsFeed git-svn-id: http://code.djangoproject.com/svn/django/trunk@9088 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/comments/feeds.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/contrib/comments/feeds.py b/django/contrib/comments/feeds.py index 232fe290e0c..d01449c9283 100644 --- a/django/contrib/comments/feeds.py +++ b/django/contrib/comments/feeds.py @@ -31,7 +31,7 @@ class LatestCommentFeed(Feed): where = ['user_id NOT IN (SELECT user_id FROM auth_users_group WHERE group_id = %s)'] params = [settings.COMMENTS_BANNED_USERS_GROUP] qs = qs.extra(where=where, params=params) - return qs[:40] + return qs.order_by('-submit_date')[:40] def item_pubdate(self, item): - return item.submit_date \ No newline at end of file + return item.submit_date