From 30b0f5f50a18e6bd35292f3e5c316eab15b530ef Mon Sep 17 00:00:00 2001 From: behruz-dev Date: Fri, 31 Oct 2025 17:40:21 +0500 Subject: [PATCH] fix --- core/apps/wherehouse/views/inventory.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/apps/wherehouse/views/inventory.py b/core/apps/wherehouse/views/inventory.py index 51dba94..3c4bf62 100644 --- a/core/apps/wherehouse/views/inventory.py +++ b/core/apps/wherehouse/views/inventory.py @@ -34,10 +34,10 @@ class InventoryListApiView(generics.GenericAPIView): inventories = inventories.filter(project_folder__in=project_folder_ids) if project_ids: inventories = inventories.filter(project__in=project_ids) - if product_exists == 'true': - inventories = inventories.exclude(quantity=0) - elif product_exists == 'false': - inventories = inventories.filter(quantity=0) + if product_exists.lower() == 'true': + inventories = inventories.exclude(quantity__lte=0) + elif product_exists.lower() == 'false': + inventories = inventories.filter(quantity__lte=0) if start_date and end_date: inventories = inventories.filter(created_at__range=(start_date, end_date)) page = self.paginate_queryset(inventories)