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:
|
if animal_type_en not in merged:
|
||||||
merged[animal_type_en] = {
|
merged[animal_type_en] = {
|
||||||
|
"name_fa": animal_type_fa,
|
||||||
"weight": weight,
|
"weight": weight,
|
||||||
"type": item.livestock_type.weight_type
|
"type": item.livestock_type.weight_type
|
||||||
}
|
}
|
||||||
@@ -81,6 +82,7 @@ def rancher_quota_weight(rancher, inventory_entry: InventoryEntry = None, distri
|
|||||||
"remaining_weight": 20,
|
"remaining_weight": 20,
|
||||||
"by_type": [{
|
"by_type": [{
|
||||||
"name": key,
|
"name": key,
|
||||||
|
"name_fa": value['name_fa'],
|
||||||
"weight": value['weight'],
|
"weight": value['weight'],
|
||||||
"type": value['type']
|
"type": value['type']
|
||||||
} for key, value in merged.items()]
|
} for key, value in merged.items()]
|
||||||
|
|||||||
Reference in New Issue
Block a user