From 6eaa6739e273cb39c9e6258d0fbf7eb976840ab0 Mon Sep 17 00:00:00 2001 From: iFixKart Dev Date: Tue, 17 Nov 2026 16:16:08 +0530 Subject: [PATCH] fix(catalog): filter by Product.status == 'active' --- app/api/v1/routers/CatalogRouter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/v1/routers/CatalogRouter.py b/app/api/v1/routers/CatalogRouter.py index 272da05..dd90672 100644 --- a/app/api/v1/routers/CatalogRouter.py +++ b/app/api/v1/routers/CatalogRouter.py @@ -1155,7 +1155,7 @@ def get_product_detail_by_slug(slug: str, db: Session = Depends(get_db)): selectinload(Product.images), selectinload(Product.brand), ) - .where(Product.category_id == product.category_id, Product.product_id != product.product_id, Product.is_active == True) + .where(Product.category_id == product.category_id, Product.product_id != product.product_id, Product.status == "active") ) if product.brand_id: related_stmt = related_stmt.order_by((Product.brand_id == product.brand_id).desc(), Product.created_at.desc()) @@ -1176,7 +1176,7 @@ def get_product_detail_by_slug(slug: str, db: Session = Depends(get_db)): selectinload(Product.images), selectinload(Product.brand), ) - .where(Product.product_id.notin_(existing_ids), Product.is_active == True) + .where(Product.product_id.notin_(existing_ids), Product.status == "active") .order_by(Product.created_at.desc()) .limit(30) )