From 47362020edb105a83c134ff7974936b7ba190fc4 Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 30 Apr 2024 13:27:42 -0500 Subject: [PATCH] Website: reduce number of helper calls in save-questionnaire-progress (#18647) Changes: - Updated the conditional that decides whether or not to create/update Salesforce records to check if a psychological stage changes. --- website/api/controllers/save-questionnaire-progress.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/api/controllers/save-questionnaire-progress.js b/website/api/controllers/save-questionnaire-progress.js index 36794f96f6..1846c4daee 100644 --- a/website/api/controllers/save-questionnaire-progress.js +++ b/website/api/controllers/save-questionnaire-progress.js @@ -175,7 +175,7 @@ module.exports = { }//fi // Only update CRM records if the user's psychological stage changes. - if(currentStep !== userRecord.currentStep){ + if(psychologicalStage !== userRecord.psychologicalStage){ await sails.helpers.salesforce.updateOrCreateContactAndAccount.with({ emailAddress: this.req.me.emailAddress, firstName: this.req.me.firstName,