change map structure of rancher quota weight satistics
This commit is contained in:
@@ -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()]
|
||||
|
||||
Reference in New Issue
Block a user