Better dispaly of stock status

- Send status text in JSON
- Only display status if it is not "OK"
This commit is contained in:
Oliver Walters committed 2019-06-02 13:53:11 +10:00
1 parent 82f3773aa1
commit 013a85e6f7
2 files changed
+6 -1

No files matched your search

+2
View File
@@ -306,6 +306,8 @@ class StockList(generics.ListCreateAPIView):
else:
item['location__path'] = None
item['status_text'] = StockItem.ITEM_STATUS_CODES[item['status']]
return Response(data)
def get_queryset(self):