mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
BomList can be filtered by "allow_variants" flag
This commit is contained in:
parent
5c71f04360
commit
0bd0e57f16
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user