diff --git a/InvenTree/part/api.py b/InvenTree/part/api.py index 5bdd572145..b2b70b3030 100644 --- a/InvenTree/part/api.py +++ b/InvenTree/part/api.py @@ -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)