Skip to content

Commit

Permalink
Chore: Only update registration invite if invite code exists
Browse files Browse the repository at this point in the history
This update will make it so that the `UpdateRegistrationInviteJob` will
only get called if an invite code exists. I think this should help with
all the failed jobs that don't have an invite code.

Refs: #4696
  • Loading branch information
shaun-technovation committed May 3, 2024
1 parent 6435682 commit 57ed6af
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/controllers/new_registration_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,11 @@ def registration_params
end

def update_registration_invite
UpdateRegistrationInviteJob.perform_later(
invite_code: params[:inviteCode],
account_id: @profile.account.id
)
if params[:inviteCode].present?
UpdateRegistrationInviteJob.perform_later(
invite_code: params[:inviteCode],
account_id: @profile.account.id
)
end
end
end

0 comments on commit 57ed6af

Please sign in to comment.