Fix category queryset

This commit is contained in:
Iacopo Spalletti 2014-10-05 10:11:06 +02:00
parent 366913b452
commit 10735c6a0e

View file

@ -128,7 +128,7 @@ class CategoryEntriesView(BaseBlogView, ListView):
@property
def category(self):
if not self._category:
self._category = BlogCategory.objects.active_translations(get_language(), slug=self.kwargs['category']).last()
self._category = BlogCategory.objects.active_translations(get_language(), slug=self.kwargs['category']).latest('pk')
return self._category
def get_queryset(self):