diff --git a/apps/herd/services/services.py b/apps/herd/services/services.py index 581636f..3b4e15b 100644 --- a/apps/herd/services/services.py +++ b/apps/herd/services/services.py @@ -64,7 +64,7 @@ def rancher_quota_weight(rancher, inventory_entry: InventoryEntry): count = livestock_counts.get(live_stock_meta.get(animal_type), 0) weight = per_head * count - details[animal_type] = weight + details[animal_type] = {"weight": weight, "type": alloc.livestock_type.weight_type} total_weight += weight return { diff --git a/apps/product/services/services.py b/apps/product/services/services.py index ef0349d..bae851c 100644 --- a/apps/product/services/services.py +++ b/apps/product/services/services.py @@ -25,7 +25,8 @@ def quota_live_stock_allocation_info(quota: Quota) -> typing.Any: if allocations: allocations_list = [{ "name": alloc.livestock_type.name, - "quantity": alloc.quantity_kg + "quantity": alloc.quantity_kg, + "type": alloc.livestock_type.weight_type } for alloc in allocations] return allocations_list