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

Fixed up some stupid recursion on the Tree model template

This commit is contained in:
Oliver Walters
2019-06-18 00:59:54 +10:00
parent 642660d76e
commit 16b6ae8d61
8 changed files with 73 additions and 39 deletions

View File

@ -38,6 +38,9 @@ class StockCategoryTree(TreeSerializer):
def root_url(self):
return reverse('stock-index')
def get_items(self):
return StockLocation.objects.all().prefetch_related('stock_items', 'children')
class StockDetail(generics.RetrieveUpdateDestroyAPIView):
""" API detail endpoint for Stock object