And deltaco some code that went along with it

This commit is contained in:
Oliver Walters 2019-05-27 22:46:17 +10:00
parent 7de4ee80f1
commit 64403f824a

View File

@ -359,9 +359,6 @@ class StockList(generics.ListCreateAPIView):
if supplier_id:
stock_list = stock_list.filter(supplier_part__supplier=supplier_id)
# Pre-fetch related objects for better response time
stock_list = self.get_serializer_class().setup_eager_loading(stock_list)
# Also ensure that we pre-fecth all the related items
stock_list = stock_list.prefetch_related(
'part',