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.
This commit is contained in:
Eric 2024-04-30 13:27:42 -05:00 committed by GitHub
parent cb6cfe9da5
commit 47362020ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,