only include products when their category is public
This commit is contained in:
parent
9bec5f1d37
commit
d0a0623315
|
@ -8,7 +8,8 @@ class ProductQuerySet(QuerySet):
|
||||||
|
|
||||||
def available(self):
|
def available(self):
|
||||||
return self.filter(
|
return self.filter(
|
||||||
available_in__contains=timezone.now()
|
available_in__contains=timezone.now(),
|
||||||
|
category__public=True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue