include .valid() in the .featured() query (bug 584978)
This commit is contained in:
Родитель
b79013115c
Коммит
e62eaf0b65
|
@ -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."""
|
||||
|
|
Загрузка…
Ссылка в новой задаче