From fd79206a481403d731ec5a7b5a4ee7487f8b36c6 Mon Sep 17 00:00:00 2001 From: Courtney Myers Date: Fri, 29 Mar 2024 15:21:48 -0400 Subject: [PATCH 1/2] Fix typo in school district contact id field name in 2023 PRF data --- app/server/app/utilities/formio.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/server/app/utilities/formio.js b/app/server/app/utilities/formio.js index 106e3bd5..b11b9345 100644 --- a/app/server/app/utilities/formio.js +++ b/app/server/app/utilities/formio.js @@ -413,7 +413,7 @@ function fetchDataForPRFSubmission({ rebateYear, req, res }) { tribal: Prioritized_as_Tribal__c, rural: Prioritized_as_Rural__c, }, - _bad_district_contact_id: School_District_Contact__r?.Id, + _bap_district_contact_id: School_District_Contact__r?.Id, _bap_district_contact_fname: School_District_Contact__r?.FirstName, _bap_district_contact_lname: School_District_Contact__r?.LastName, _bap_district_contact_title: School_District_Contact__r?.Title, From 08564cda9d9aa1efcca12f0a942bf1a45a467fa4 Mon Sep 17 00:00:00 2001 From: Courtney Myers Date: Fri, 29 Mar 2024 15:30:28 -0400 Subject: [PATCH 2/2] Update building up of org_organizations array in new 2023 PRF data to account for renamed '_org_id' field --- app/server/app/utilities/formio.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/server/app/utilities/formio.js b/app/server/app/utilities/formio.js index b11b9345..b130c61d 100644 --- a/app/server/app/utilities/formio.js +++ b/app/server/app/utilities/formio.js @@ -244,8 +244,8 @@ function fetchDataForPRFSubmission({ rebateYear, req, res }) { * If the org has already been added, update org_type as needed * and and advance to the next org in the loop. */ - if (array.some((item) => item.org_id === orgId)) { - const org = array.find((item) => item.org_id === orgId); + if (array.some((item) => item._org_id === orgId)) { + const org = array.find((item) => item._org_id === orgId); if (existingBusOwner) org.org_type.existingBusOwner = true; if (newBusOwner) org.org_type.newBusOwner = true;