2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 11:10:54 +00:00
This commit is contained in:
Oliver Walters
2021-04-20 20:42:55 +10:00
parent 2bb86ff22b
commit 4d1eb51bc4
3 changed files with 51 additions and 3 deletions

View File

@ -295,8 +295,11 @@ class StockLocationList(generics.ListCreateAPIView):
cascade = str2bool(params.get('cascade', False))
# Do not filter by location
if loc_id is None:
pass
# Look for top-level locations
if isNull(loc_id):
elif isNull(loc_id):
# If we allow "cascade" at the top-level, this essentially means *all* locations
if not cascade: