Skip to content

Commit

Permalink
Fix race
Browse files Browse the repository at this point in the history
  • Loading branch information
iHiD committed Dec 18, 2024
1 parent 078d444 commit c9205f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def add_subscriber!

def add_to_form!
RestClient.post(
"https://api.kit.com//v4/forms/#{BOOTCAMP_FORM_ID}/subscribers",
"https://api.kit.com/v4/forms/#{BOOTCAMP_FORM_ID}/subscribers",
{
"email_address": bootcamp_data.email
}, HEADERS
Expand Down
2 changes: 1 addition & 1 deletion app/models/user/bootcamp_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class User::BootcampData < ApplicationRecord
scope :not_enrolled, -> { where(enrolled_at: nil) }
scope :not_paid, -> { where(paid_at: nil) }

after_save do
after_save_commit do
User::Bootcamp::SubscribeToOnboardingEmails.defer(self)
end

Expand Down

0 comments on commit c9205f3

Please sign in to comment.