add pricing_type_name to price calculation items

This commit is contained in:
2025-10-21 13:39:26 +03:30
parent 2e236fe264
commit 42930b8e51

View File

@@ -69,11 +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"], "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", "pricing_type_name", "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