mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fixes to the way ManufacturerPart is saved, manufacturer table filtering and test units
This commit is contained in:
@ -94,6 +94,7 @@ class ManufacturerPartList(generics.ListCreateAPIView):
|
||||
queryset = ManufacturerPart.objects.all().prefetch_related(
|
||||
'part',
|
||||
'manufacturer',
|
||||
'supplier_parts',
|
||||
)
|
||||
|
||||
serializer_class = ManufacturerPartSerializer
|
||||
@ -141,6 +142,12 @@ class ManufacturerPartList(generics.ListCreateAPIView):
|
||||
if part is not None:
|
||||
queryset = queryset.filter(part=part)
|
||||
|
||||
# Filter by supplier part?
|
||||
supplier_part = params.get('supplier_part', None)
|
||||
|
||||
if supplier_part is not None:
|
||||
queryset = queryset.filter(supplier_parts=supplier_part)
|
||||
|
||||
# Filter by 'active' status of the part?
|
||||
active = params.get('active', None)
|
||||
|
||||
|
Reference in New Issue
Block a user