From d5d2c1800612d84c513c16143cd0f5a093e984c1 Mon Sep 17 00:00:00 2001 From: Subhasis Chakraborti Date: Tue, 12 Dec 2023 16:34:58 -0500 Subject: [PATCH] Bug fix --- backend/services/partnerNetwork/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/backend/services/partnerNetwork/index.js b/backend/services/partnerNetwork/index.js index 7b343b3c..b9784270 100644 --- a/backend/services/partnerNetwork/index.js +++ b/backend/services/partnerNetwork/index.js @@ -79,7 +79,9 @@ async function updateOrganizationGenericAssets(organizationGenericId, partnerDat } let assets = await fetchGenericDatasHelper(assetType); - assets = assets.filter(asset => asset.serviceProvider?._id === organizationGenericId); +console.log(JSON.stringify(assets)) +console.log(organizationGenericId) + assets = assets.filter(asset => asset.serviceProvider?.organization?._id === organizationGenericId); assetLoop: for (assetData of partnerData.organization[assetType + 's']) { @@ -91,9 +93,12 @@ async function updateOrganizationGenericAssets(organizationGenericId, partnerDat asset.fields[PredefinedInternalTypes[internalType]._uri.split('#')[1]] = internalTypes[internalType](assetData.program?.split('_')[1]); } asset.formId = formId; - +console.log('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'); +console.log(JSON.stringify(assetData)) +console.log(JSON.stringify(assets)) for (assetIndex in assets) { const assetGeneric = assets[assetIndex]; +console.log('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!') console.log(assetGeneric.idInPartnerDeployment) console.log(assetData.id) if (assetGeneric.idInPartnerDeployment == assetData.id) {