From 5fa0e7649945964ac93dda9e4d8397356b71d403 Mon Sep 17 00:00:00 2001 From: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Date: Wed, 21 Aug 2024 18:11:25 +0530 Subject: [PATCH] Update campaignUtils.ts (#1315) --- 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 c9ff556e914..9981fb42917 100644 --- a/utilities/project-factory/src/server/utils/campaignUtils.ts +++ b/utilities/project-factory/src/server/utils/campaignUtils.ts @@ -615,7 +615,7 @@ async function enrichAndPersistCampaignForUpdate(request: any, firstPersist: boo request.body.CampaignDetails.status = action == "create" ? campaignStatuses.started : campaignStatuses.drafted; const boundaryCode = !(request?.body?.CampaignDetails?.projectId) ? getRootBoundaryCode(request.body.CampaignDetails.boundaries) : (request?.body?.CampaignDetails?.boundaryCode || ExistingCampaignDetails?.boundaryCode) request.body.CampaignDetails.boundaryCode = boundaryCode - request.body.CampaignDetails.isActive = ExistingCampaignDetails?.isActive + request.body.CampaignDetails.isActive = ExistingCampaignDetails?.isActive || null request.body.CampaignDetails.parentId = ExistingCampaignDetails?.parentId || null request.body.CampaignDetails.startDate = request?.body?.CampaignDetails?.startDate || ExistingCampaignDetails?.startDate || null request.body.CampaignDetails.endDate = request?.body?.CampaignDetails?.endDate || ExistingCampaignDetails?.endDate || null