-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
School info in admin, Sentry message on school error during lead creation #1236
Changes from 9 commits
09b8f63
ff9e4a8
58842bf
787227e
e2abf47
3568996
cde54e2
ab96260
0d3b65b
5928de8
7c548bd
94ee7f8
73b9b31
62d1d0b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,6 +121,8 @@ def call | |
user.grant_tutor_access = sf_contact.grant_tutor_access | ||
|
||
if school.nil? && !sf_school.nil? | ||
# Add the possible updated school id to the record, we check for this in UpdateSchoolSalesforceInfo | ||
user.school.updated_salesforce_id = sf_school.id | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. user.school is maybe not always set? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also this code would only be relevant when the school is in SF but not in Accounts, which hopefully only happens sometimes in the first sync after CS adds a school in SF. |
||
SecurityLog.create!( | ||
user: user, | ||
event_type: :attempted_to_add_school_not_cached_yet, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddUpdatedSalesforceIdToSchools < ActiveRecord::Migration[5.2] | ||
def change | ||
add_column :schools, :updated_salesforce_id, :text | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd call reload before destroy!, just in case... otherwise it could try to dissociate the users.