mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-01 13:06:45 +00:00
Merge branch 'tree-speed' of https://github.com/SchrodingersGat/InvenTree into tree-speed
# Conflicts: # InvenTree/InvenTree/views.py
This commit is contained in:
commit
a796b984ff
@ -76,6 +76,9 @@ class TreeSerializer(views.APIView):
|
|||||||
|
|
||||||
top_count = 0
|
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:
|
for item in top_items:
|
||||||
nodes.append(self.itemToJson(item))
|
nodes.append(self.itemToJson(item))
|
||||||
top_count += item.item_count
|
top_count += item.item_count
|
||||||
|
Loading…
x
Reference in New Issue
Block a user