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:
@ -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
|
||||
|
Reference in New Issue
Block a user