2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-06 05:30:56 +00:00

Switch between display and edit mode for build allocations

This commit is contained in:
Oliver Walters
2019-05-27 08:07:38 +10:00
parent 59fa59f760
commit a305301b95
8 changed files with 100 additions and 34 deletions

View File

@ -70,6 +70,10 @@ class BuildItemList(generics.ListCreateAPIView):
query = BuildItem.objects.all()
query = query.select_related('stock_item')
query = query.prefetch_related('stock_item__part')
query = query.prefetch_related('stock_item__part__category')
if part_pk:
query = query.filter(stock_item__part=part_pk)