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) )