From f2cf0bf0b71377e7edc36bb3505c4eeedcfa95da Mon Sep 17 00:00:00 2001 From: nitish-egov <137176807+nitish-egov@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:42:03 +0530 Subject: [PATCH] Boundary upload to have not generate boundary code if code is already filled to support migration (#1121) * fixed target validate for different tabs not present * resource activity persisting in db * added timeout of 2 sec for boundary entity to persist * Boundary upload to have not generate boundary code if code is already filled to support migration * Update index.ts --- utilities/project-factory/src/server/utils/campaignUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/project-factory/src/server/utils/campaignUtils.ts b/utilities/project-factory/src/server/utils/campaignUtils.ts index 60309d4fc5b..91ee6ce9579 100644 --- a/utilities/project-factory/src/server/utils/campaignUtils.ts +++ b/utilities/project-factory/src/server/utils/campaignUtils.ts @@ -1610,7 +1610,7 @@ const autoGenerateBoundaryCodes = async (request: any, localizationMap?: any) => const modifiedBoundaryData = modifyBoundaryDataHeaders(updatedBoundaryData, hierarchy, localizationMap); const [withBoundaryCode, withoutBoundaryCode] = modifyBoundaryData(modifiedBoundaryData, localizationMap); const { mappingMap, countMap } = getCodeMappingsOfExistingBoundaryCodes(withBoundaryCode); - const childParentMap = getChildParentMap(withoutBoundaryCode); + const childParentMap = getChildParentMap([...withBoundaryCode,...withoutBoundaryCode]); const boundaryMap = await getAutoGeneratedBoundaryCodesHandler(withoutBoundaryCode, childParentMap, mappingMap, countMap, request); logger.info("Boundary Code Auto Generation Completed"); await createBoundaryEntities(request, boundaryMap);