Skip to content

Commit

Permalink
Restore product filtering per language (#7208)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoChevalier authored Aug 10, 2021
1 parent 2fedad3 commit 0cdd901
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion network-api/networkapi/wagtailpages/pagemodels/products.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ def get_product_subset(cutoff_date, authenticated, key, products, language_code=
to the system or not (authenticated users get to
see all products, including draft products)
"""
products = products.filter(review_date__gte=cutoff_date)
products = products.filter(
review_date__gte=cutoff_date,
locale=Locale.objects.get(language_code=language_code)
)
if not authenticated:
products = products.live()
products = sort_average(products)
Expand Down

0 comments on commit 0cdd901

Please sign in to comment.