From e5be667690a5184e55c8640c90532fc9ad37c80c Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 4 Sep 2024 14:40:44 +0300 Subject: [PATCH] feat: product search --- services/product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/product.py b/services/product.py index f48f6a9..71f2d08 100644 --- a/services/product.py +++ b/services/product.py @@ -120,7 +120,7 @@ class ProductService(BaseService): stmt.where( or_( Product.name.ilike(f'%{search_input}%'), - Product.barcodes.any(ProductBarcode.barcode == search_input), + Product.barcodes.any(ProductBarcode.barcode.ilike(f'%{search_input}%')), Product.article.ilike(f'%{search_input}%') ) )