From 673f15e92554e0f95cdc1bac95d1e9f1f8308510 Mon Sep 17 00:00:00 2001 From: Dante Soares Date: Fri, 28 Jun 2024 10:18:24 -0500 Subject: [PATCH] Check if Salesforce contact exists (missing Contact on dev) (#1248) Co-authored-by: Michael Volo --- app/routines/update_salesforce_assignable_fields.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/routines/update_salesforce_assignable_fields.rb b/app/routines/update_salesforce_assignable_fields.rb index 99a78faef..0f5db78e0 100644 --- a/app/routines/update_salesforce_assignable_fields.rb +++ b/app/routines/update_salesforce_assignable_fields.rb @@ -17,6 +17,8 @@ def call(created_after) next if contact_id.nil? contact = OpenStax::Salesforce::Remote::Contact.find(contact_id) + next if contact.nil? + contact.assignable_interest = 'Fully Integrated' contact.assignable_adoption_date = external_id.min_created_at contact.save!