diff --git a/nfu_ecommerce/controllers/main.py b/nfu_ecommerce/controllers/main.py index 52dc815..bed77ec 100644 --- a/nfu_ecommerce/controllers/main.py +++ b/nfu_ecommerce/controllers/main.py @@ -48,6 +48,6 @@ class WebsiteSale(WebsiteSale): ) post["open_product_ids"] = open_product_ids else: - post["open_product_ids"] = [] + post["open_product_ids"] = None res = super().shop(page=0, category=None, search="", min_price=0.0, max_price=0.0, ppg=False, **post) return res diff --git a/nfu_ecommerce/models/product_template.py b/nfu_ecommerce/models/product_template.py index ab096e6..9ea29dc 100644 --- a/nfu_ecommerce/models/product_template.py +++ b/nfu_ecommerce/models/product_template.py @@ -16,6 +16,6 @@ class ProductTemplate(models.Model): search_details = super()._search_get_detail(website, order, options) open_product_ids = options.get("open_product_ids") domain = search_details["base_domain"] - if len(open_product_ids): + if open_product_ids is not None: domain.append([("id", "in", tuple(open_product_ids))]) return search_details