From 607a59a900155c629e8f6eef49f03eed77df231f Mon Sep 17 00:00:00 2001 From: Mojtaba-z Date: Mon, 22 Sep 2025 15:51:32 +0330 Subject: [PATCH] change map structure of rancher quota weight satistics --- apps/herd/services/services.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/herd/services/services.py b/apps/herd/services/services.py index 9230e00..1275de3 100644 --- a/apps/herd/services/services.py +++ b/apps/herd/services/services.py @@ -70,6 +70,7 @@ def rancher_quota_weight(rancher, inventory_entry: InventoryEntry = None, distri if animal_type_en not in merged: merged[animal_type_en] = { + "name_fa": animal_type_fa, "weight": weight, "type": item.livestock_type.weight_type } @@ -81,6 +82,7 @@ def rancher_quota_weight(rancher, inventory_entry: InventoryEntry = None, distri "remaining_weight": 20, "by_type": [{ "name": key, + "name_fa": value['name_fa'], "weight": value['weight'], "type": value['type'] } for key, value in merged.items()]