diff --git a/backend/src/components/user.js b/backend/src/components/user.js index 0b0eb350e..fb72100cf 100644 --- a/backend/src/components/user.js +++ b/backend/src/components/user.js @@ -161,14 +161,12 @@ function updateFacilityWithChangeRequestDetails(changeRequestList, returnValue, let changeActionNewFacilityList = changeRequest?.ccof_change_action_change_request?.filter(item =>item.ccof_changetype === CHANGE_REQUEST_TYPES.NEW_FACILITY); for (const changeActionNewFacility of changeActionNewFacilityList) { let result = changeActionNewFacility?.ccof_change_request_new_facility_change_act.find(item => item['_ccof_facility_value'] === facilityId); - if (result) { + //RLO - if facilityAccountNumber exists, then then don't update the facility statuses, since this is now part of the PCF + if (result && !returnValue.facilityAccountNumber) { returnValue.changeRequestId = changeRequest?.ccof_change_requestid; - //RLO - if facilityAccountNumber exists, then then don't update the facility statuses, since this is now part of the PCF - if (!returnValue.facilityAccountNumber) { - returnValue.unlockCcfri = result?.ccof_unlock_ccfri; - returnValue.unlockNmf = result?.ccof_unlock_nmf_rfi; - returnValue.unlockRfi = result?.ccof_unlock_rfi; - } + returnValue.unlockCcfri = result?.ccof_unlock_ccfri; + returnValue.unlockNmf = result?.ccof_unlock_nmf_rfi; + returnValue.unlockRfi = result?.ccof_unlock_rfi; } } }