include .valid() in the .featured() query (bug 584978)

This commit is contained in:
Jeff Balogh 2010-08-06 12:00:03 -07:00
Родитель b79013115c
Коммит e62eaf0b65
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -52,8 +52,9 @@ class AddonManager(amo.models.ManagerBase):
Filter for all featured add-ons for an application in all locales.
"""
today = date.today()
return self.filter(feature__application=app.id,
feature__start__lte=today, feature__end__gte=today)
return self.valid().filter(feature__application=app.id,
feature__start__lte=today,
feature__end__gte=today)
def category_featured(self):
"""Get all category-featured add-ons for ``app`` in all locales."""