fix
This commit is contained in:
@@ -34,10 +34,10 @@ class InventoryListApiView(generics.GenericAPIView):
|
|||||||
inventories = inventories.filter(project_folder__in=project_folder_ids)
|
inventories = inventories.filter(project_folder__in=project_folder_ids)
|
||||||
if project_ids:
|
if project_ids:
|
||||||
inventories = inventories.filter(project__in=project_ids)
|
inventories = inventories.filter(project__in=project_ids)
|
||||||
if product_exists == 'true':
|
if product_exists.lower() == 'true':
|
||||||
inventories = inventories.exclude(quantity=0)
|
inventories = inventories.exclude(quantity__lte=0)
|
||||||
elif product_exists == 'false':
|
elif product_exists.lower() == 'false':
|
||||||
inventories = inventories.filter(quantity=0)
|
inventories = inventories.filter(quantity__lte=0)
|
||||||
if start_date and end_date:
|
if start_date and end_date:
|
||||||
inventories = inventories.filter(created_at__range=(start_date, end_date))
|
inventories = inventories.filter(created_at__range=(start_date, end_date))
|
||||||
page = self.paginate_queryset(inventories)
|
page = self.paginate_queryset(inventories)
|
||||||
|
|||||||
Reference in New Issue
Block a user