Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

refactor: Use `first!` for transfer lookup (#837)

sentry[bot]8a8ae5495451
diff --git a/app/controllers/transfers_controller.rb b/app/controllers/transfers_controller.rb
index db43435845..248f8d4ad4 100644
--- a/app/controllers/transfers_controller.rb
+++ b/app/controllers/transfers_controller.rb
@@ -55,7 +55,7 @@ class TransfersController < ApplicationController
@transfer = Transfer
.where(id: params[:id])
.where(inflow_transaction_id: Current.family.transactions.select(:id))
- .first
+ .first!
end
def transfer_params