From 01a317a4cbf45264e69f3466cc4997aa425939b7 Mon Sep 17 00:00:00 2001 From: Domenico DiNicola Date: Tue, 5 Nov 2024 15:37:11 +0100 Subject: [PATCH] generic import: size --- .../contrib/aurora/services/generic_registration_service.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hct_mis_api/contrib/aurora/services/generic_registration_service.py b/src/hct_mis_api/contrib/aurora/services/generic_registration_service.py index d414cda68f..4e65fa6217 100644 --- a/src/hct_mis_api/contrib/aurora/services/generic_registration_service.py +++ b/src/hct_mis_api/contrib/aurora/services/generic_registration_service.py @@ -215,9 +215,10 @@ def create_household_data( "country": str(Country.objects.get(iso_code2=mapping["defaults"][COUNTRY]).pk), "consent": True, "collect_individual_data": YES, - "size": len(record_data_dict[individuals_key]), "flex_fields": flex_fields, } + if "size" not in household_data: + household_data["size"] = len(record_data_dict[individuals_key]) return self._create_object_and_validate(household_data, PendingHousehold) def create_individuals(