mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-15 03:25:42 +00:00
BomList can be filtered by "allow_variants" flag
This commit is contained in:
@ -821,6 +821,14 @@ class BomList(generics.ListCreateAPIView):
|
||||
|
||||
queryset = queryset.filter(inherited=inherited)
|
||||
|
||||
# Filter by "allow_variants"
|
||||
variants = params.get("allow_variants", None)
|
||||
|
||||
if variants is not None:
|
||||
variants = str2bool(variants)
|
||||
|
||||
queryset = queryset.filter(allow_variants=variants)
|
||||
|
||||
# Filter by part?
|
||||
part = params.get('part', None)
|
||||
|
||||
|
Reference in New Issue
Block a user