From e75ea9896e8f7712154dabf0b93cfb68b29d7e82 Mon Sep 17 00:00:00 2001 From: pavlo-mk Date: Mon, 16 Dec 2024 17:58:01 +0100 Subject: [PATCH] create PP use tp.household_list instead of households --- src/hct_mis_api/apps/payment/services/payment_plan_services.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hct_mis_api/apps/payment/services/payment_plan_services.py b/src/hct_mis_api/apps/payment/services/payment_plan_services.py index 8378c21736..8cb36a605f 100644 --- a/src/hct_mis_api/apps/payment/services/payment_plan_services.py +++ b/src/hct_mis_api/apps/payment/services/payment_plan_services.py @@ -314,7 +314,7 @@ def check_payment_plan_and_update_status(self, approval_process: ApprovalProcess def create_payments(payment_plan: PaymentPlan) -> None: payments_to_create = [] households = ( - payment_plan.target_population.households.annotate( + payment_plan.target_population.household_list.annotate( collector=IndividualRoleInHousehold.objects.filter(household=OuterRef("pk"), role=ROLE_PRIMARY).values( "individual" )[:1]