Skip to content

Commit

Permalink
Merge pull request #406 from bcgov/ofmcc-6472-update-facility-query
Browse files Browse the repository at this point in the history
ofmcc-6472 - filter out facilities with blank program
  • Loading branch information
vietle-cgi authored Oct 31, 2024
2 parents 252faf5 + 37742dd commit ea94a7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/components/organizations.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async function getOrganizationFacilities(req, res) {
}

async function getRawOrganizationFacilities(organizationId) {
const operation = `accounts?$select=accountid,accountnumber,name,ofm_program,ccof_accounttype&$filter=(_parentaccountid_value eq ${organizationId}) and (statecode eq 0) and (ofm_program ne ${OFM_PROGRAM_CODES.CCOF})&pageSize=500`
const operation = `accounts?$select=accountid,accountnumber,name,ofm_program,ccof_accounttype&$filter=(_parentaccountid_value eq ${organizationId}) and (statecode eq 0) and (ofm_program ne null and ofm_program ne ${OFM_PROGRAM_CODES.CCOF})&pageSize=500`
const response = await getOperation(operation)
const orgFacilities = []
response?.value?.forEach((item) => orgFacilities.push(new MappableObjectForFront(item, FacilityMappings).toJSON()))
Expand Down

0 comments on commit ea94a7c

Please sign in to comment.