Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
htysc committed Dec 12, 2023
1 parent a8ae89c commit d5d2c18
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions backend/services/partnerNetwork/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']) {
Expand All @@ -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) {
Expand Down

0 comments on commit d5d2c18

Please sign in to comment.