Skip to content

Commit 4a3ef98

Browse files
committed
Fixed success state
1 parent 76217fd commit 4a3ef98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/controllers/funds_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ def donate
3232
if params[:OrderId].present?
3333
id = params[:OrderId]
3434

35-
@transaction = Transaction.donations.where("transactions.order->>'legacyId' = ?", id.to_s)
35+
@transaction = Transaction.donations.where("transactions.order->>'legacyId' = ?", id.to_s).first
3636
if @transaction.nil?
3737
@fund.sync_transactions
38-
@transaction = Transaction.donations.where("transactions.order->>'legacyId' = ?", id.to_s)
38+
@transaction = Transaction.donations.where("transactions.order->>'legacyId' = ?", id.to_s).first
3939
raise ActiveRecord::RecordNotFound unless @transaction
4040
end
4141
end

0 commit comments

Comments
 (0)