mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Defined custom SupplierPart object manager and prefetch related models in all queries
This commit is contained in:
@ -263,11 +263,7 @@ class SupplierPartList(generics.ListCreateAPIView):
|
||||
- POST: Create a new SupplierPart object
|
||||
"""
|
||||
|
||||
queryset = SupplierPart.objects.all().prefetch_related(
|
||||
'part',
|
||||
'supplier',
|
||||
'manufacturer_part__manufacturer',
|
||||
)
|
||||
queryset = SupplierPart.objects.all()
|
||||
|
||||
def get_queryset(self):
|
||||
|
||||
|
Reference in New Issue
Block a user