mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Send item 'pk' in tree JSON
This commit is contained in:
parent
92930766c6
commit
897c0b5261
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user