mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Default stock list behaviour is to only show in_stock items
This commit is contained in:
parent
0da9e0f834
commit
3336eb9f45
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user