mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-06 18:31:16 +00:00
Send item 'pk' in tree JSON
This commit is contained in:
1 parent
92930766c6
commit
897c0b5261
1 file changed
+2
@@ -40,6 +40,7 @@ class TreeSerializer(views.APIView):
|
||||
def itemToJson(self, item):
|
||||
|
||||
data = {
|
||||
'pk': item.id,
|
||||
'text': item.name,
|
||||
'href': item.get_absolute_url(),
|
||||
'tags': [item.item_count],
|
||||
@@ -68,6 +69,7 @@ class TreeSerializer(views.APIView):
|
||||
top_count += item.item_count
|
||||
|
||||
top = {
|
||||
'pk': None,
|
||||
'text': self.title,
|
||||
'href': self.root_url,
|
||||
'nodes': nodes,
|
||||
|
||||
Reference in new issue
Block a user