2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-13 08:21:26 +00:00

Bug fix for StockItem list API

- The wrong detail data was being set
This commit is contained in:
Oliver Walters
2020-05-02 13:51:29 +10:00
parent 4197e29fce
commit 7fca496de8
3 changed files with 4 additions and 4 deletions

View File

@ -87,10 +87,10 @@ class StockItemSerializer(InvenTreeModelSerializer):
"""
queryset = queryset.annotate(
allocated = Coalesce(
allocated=Coalesce(
Sum('sales_order_allocations__quantity', distinct=True), 0) + Coalesce(
Sum('allocations__quantity', distinct=True), 0),
tracking_items = Count('tracking_info'),
tracking_items=Count('tracking_info'),
)
return queryset