Skip to content

Commit

Permalink
Merge pull request #108 from project-sunbird/release-5.0.0-hotfix
Browse files Browse the repository at this point in the history
Fatal error fix in hotfix code of 5.0.0
  • Loading branch information
aks30 authored Nov 17, 2022
2 parents eb2c6e0 + be5ab6c commit 5ef2647
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/observations/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2266,14 +2266,14 @@ function _updateUserProfileBasedOnUserRoleInfo(userProfile, userRoleInformation)
if(currentProfileUserType.subType && currentProfileUserType.subType !== null) { // If the role has a subType

// Check if subType exists in userRoleInformation role, if not means profile data is old and should be reset.
if(!observation.userRoleInformation.role.toUpperCase().includes(currentProfileUserType.subType.toUpperCase())) {
if(!userRoleInformation.role.toUpperCase().includes(currentProfileUserType.subType.toUpperCase())) {
resetCurrentUserProfileRoles = true; // Reset userProfile.profileUserTypes
break;
}
} else { // If the role subType is null or is not there

// Check if type exists in userRoleInformation role, if not means profile data is old and should be reset.
if(!observation.userRoleInformation.role.toUpperCase().includes(currentProfileUserType.type.toUpperCase())) {
if(!userRoleInformation.role.toUpperCase().includes(currentProfileUserType.type.toUpperCase())) {
resetCurrentUserProfileRoles = true; // Reset userProfile.profileUserTypes
break;
}
Expand Down

0 comments on commit 5ef2647

Please sign in to comment.