From c7fe8961abc6f5a651b8aea50aab8930b2f47b4e Mon Sep 17 00:00:00 2001 From: Kenneth SOARES Date: Tue, 16 Sep 2025 12:43:03 +0200 Subject: [PATCH] fixed display of archived products --- counter/models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/counter/models.py b/counter/models.py index d2b9a927..ca43184a 100644 --- a/counter/models.py +++ b/counter/models.py @@ -690,8 +690,10 @@ class Counter(models.Model): Prices will be annotated """ - products = self.products.select_related("product_type").prefetch_related( - "buying_groups" + products = ( + self.products.filter(archived=False) + .select_related("product_type") + .prefetch_related("buying_groups") ) # Only include age appropriate products