add pricing_type_name to price calculation items

This commit is contained in:
2025-10-21 13:35:12 +03:30
parent 142128d6a8
commit 2e236fe264

View File

@@ -69,10 +69,11 @@ class QuotaSerializer(serializers.ModelSerializer):
items = [ items = [
{ {
"pricing_type": it["pricing_type_id"], "pricing_type": it["pricing_type_id"],
"pricing_type_name": it["pricing_type_name"],
"name": it["name"], "name": it["name"],
"value": it["value"], "value": it["value"],
} }
for it in instance.pricing_items.values("pricing_type_id", "name", "value") for it in instance.pricing_items.values("pricing_type_id", "pricing_type_name", "name", "value")
] ]
representation["price_calculation_items"] = items representation["price_calculation_items"] = items