Skip to content

Commit

Permalink
Merge pull request #65 from shikshalokam/4.8_program
Browse files Browse the repository at this point in the history
programsByPlatformRoles api changes
  • Loading branch information
aks30 authored Mar 9, 2022
2 parents 201b2a4 + 535335c commit 7681bc1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions module/user-extension/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -571,13 +571,18 @@ module.exports = class UserExtensionHelper {
}

for( let program = 0; program < currentRole.programs.length;program++) {
programMapToRole[currentRole.programs[program].toString()] = currentRole.code;
if(programMapToRole[currentRole.programs[program].toString()] && programMapToRole[currentRole.programs[program].toString()].length > 0){
programMapToRole[currentRole.programs[program].toString()].push(currentRole.code);
}else {
programMapToRole[currentRole.programs[program].toString()] = [currentRole.code];
}

programIds.push(currentRole.programs[program]);
}

}
}

const programData = await programsHelper.programDocuments({
_id: {$in: programIds},
status: constants.common.ACTIVE
Expand Down

0 comments on commit 7681bc1

Please sign in to comment.