From be5ab6c73ba36a08ff58637d78b4939ebb260674 Mon Sep 17 00:00:00 2001 From: Akash Shah Date: Thu, 17 Nov 2022 18:57:09 +0530 Subject: [PATCH] Fatal error fix in hotfix code of 5.0.0 --- module/observations/helper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/observations/helper.js b/module/observations/helper.js index 0e558503..48bf384a 100644 --- a/module/observations/helper.js +++ b/module/observations/helper.js @@ -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; }