Skip to content

Commit

Permalink
feat(dunning): Prevent creating payment request on deleted customer
Browse files Browse the repository at this point in the history
  • Loading branch information
rsempe committed Aug 30, 2024
1 parent c3650c9 commit 41c2499
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/payment_requests/create_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def check_preconditions
end

def customer
@customer ||= organization.customers.find_by(external_id: params[:external_customer_id])
@customer ||= organization.customers.active.find_by(external_id: params[:external_customer_id])
end

def invoices
Expand Down

0 comments on commit 41c2499

Please sign in to comment.