fmartingr
/
shelfzilla
Archived
1
0
Fork 0

User PK = 1 shouldn't show up in any result

This commit is contained in:
Felipe Martín 2014-08-24 17:59:43 +02:00
parent aee0eded8e
commit 6569d3ce96
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ class HomepageView(View):
data = {}
from datetime import datetime
# TOP 5
data['TOP_5_COLLECTORS'] = User.objects.all()\
data['TOP_5_COLLECTORS'] = User.objects.filter(pk__gt=1)\
.annotate(num_volumes=Count('have_volumes'))\
.order_by('-num_volumes')[:5]