From ff471b46174d8968f3eef1c8b20d3ed4354dfae6 Mon Sep 17 00:00:00 2001 From: Domenico DiNicola Date: Mon, 11 Nov 2024 16:26:47 +0000 Subject: [PATCH] pg changes --- src/frontend/package.json | 2 +- .../apps/payment/services/payment_gateway.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/frontend/package.json b/src/frontend/package.json index 1e565c762e..23e1b4b559 100644 --- a/src/frontend/package.json +++ b/src/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "2.12.3", + "version": "2.13.0", "private": true, "type": "module", "scripts": { diff --git a/src/hct_mis_api/apps/payment/services/payment_gateway.py b/src/hct_mis_api/apps/payment/services/payment_gateway.py index 05c8402441..5096f053b3 100644 --- a/src/hct_mis_api/apps/payment/services/payment_gateway.py +++ b/src/hct_mis_api/apps/payment/services/payment_gateway.py @@ -54,7 +54,7 @@ class PaymentInstructionStatus(Enum): class PaymentInstructionFromDeliveryMechanismPerPaymentPlanSerializer(ReadOnlyModelSerializer): remote_id = serializers.CharField(source="id") - unicef_id = serializers.CharField(source="payment_plan.unicef_id") + external_code = serializers.CharField(source="payment_plan.unicef_id") fsp = serializers.SerializerMethodField() payload = serializers.SerializerMethodField() extra = serializers.SerializerMethodField() @@ -78,7 +78,7 @@ class Meta: model = DeliveryMechanismPerPaymentPlan fields = [ "remote_id", - "unicef_id", + "external_code", "fsp", "payload", "extra", @@ -86,16 +86,16 @@ class Meta: class PaymentInstructionFromSplitSerializer(PaymentInstructionFromDeliveryMechanismPerPaymentPlanSerializer): - unicef_id = serializers.SerializerMethodField() # type: ignore + external_code = serializers.SerializerMethodField() # type: ignore - def get_unicef_id(self, obj: Any) -> str: + def get_external_code(self, obj: Any) -> str: return f"{obj.payment_plan.unicef_id}-{obj.order}" class Meta: model = PaymentPlanSplit fields = [ "remote_id", - "unicef_id", + "external_code", "fsp", "payload", "extra", @@ -210,7 +210,7 @@ def get_transferred_status_based_on_delivery_amount() -> str: @dataclasses.dataclass() class PaymentInstructionData(FlexibleArgumentsDataclassMixin): remote_id: str - unicef_id: str + external_code: str status: str # "DRAFT" fsp: str system: int