mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-05 09:55:28 +00:00
Default stock list behaviour is to only show in_stock items
This commit is contained in:
1 parent
0da9e0f834
commit
3336eb9f45
1 file changed
+2
-1
@@ -518,7 +518,8 @@ class StockList(generics.ListCreateAPIView):
|
|||||||
if serial_number_lte is not None:
|
if serial_number_lte is not None:
|
||||||
queryset = queryset.filter(serial__lte=serial_number_lte)
|
queryset = queryset.filter(serial__lte=serial_number_lte)
|
||||||
|
|
||||||
in_stock = params.get('in_stock', None)
|
# Filter by "in_stock" status (default behaviour is "True")
|
||||||
|
in_stock = params.get('in_stock', True)
|
||||||
|
|
||||||
if in_stock is not None:
|
if in_stock is not None:
|
||||||
in_stock = str2bool(in_stock)
|
in_stock = str2bool(in_stock)
|
||||||
|
|||||||
Reference in new issue
Block a user