From 9e6534933653086226f6b98bfcb43ca94b9f2ccf Mon Sep 17 00:00:00 2001 From: eric Date: Wed, 6 Mar 2013 14:15:07 -0500 Subject: [PATCH] turns out pubdate messes up distinct, MySQL doesn't support DISTINCT ON --- frontend/templates/explore.html | 1 - frontend/views.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/templates/explore.html b/frontend/templates/explore.html index a75b722d..e6fc70e1 100644 --- a/frontend/templates/explore.html +++ b/frontend/templates/explore.html @@ -25,7 +25,6 @@ {% endif %} diff --git a/frontend/views.py b/frontend/views.py index caa593aa..74b5ceba 100755 --- a/frontend/views.py +++ b/frontend/views.py @@ -529,7 +529,7 @@ class ByPubListView(WorkListView): if (facet == 'popular'): return objects.order_by('-num_wishes', 'id') elif (facet == 'pubdate'): - return objects.order_by('-editions__publication_date') + return objects.order_by('-editions__publication_date') # turns out this messes up distinct, and MySQL doesn't support DISTINCT ON elif (facet == 'new'): return objects.filter(num_wishes__gt=0).order_by('-created', '-num_wishes' ,'id') else: