mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +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
|
||||
|
||||
# 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
|
||||
|
Loading…
Reference in New Issue
Block a user