Merge branch 'tree-speed' of https://github.com/SchrodingersGat/InvenTree into tree-speed

# Conflicts:
#	InvenTree/InvenTree/views.py
This commit is contained in:
Oliver Walters 2019-06-17 23:55:21 +10:00
commit a796b984ff

View File

@ -76,6 +76,9 @@ class TreeSerializer(views.APIView):
top_count = 0
# Construct the top-level items
top_items = [i for i in items if i.parent is None]
for item in top_items:
nodes.append(self.itemToJson(item))
top_count += item.item_count