From 16ae2493c7142c92f76f9dce7b50e1e3e0fea18f Mon Sep 17 00:00:00 2001 From: Nele Noack Date: Tue, 4 Feb 2025 13:53:41 +0100 Subject: [PATCH] fix(nbp): abort finalize action if no relationship exists When appending a return statement to a method call, either with `and` or `&&`, the return won't happen if there is a tailing one-line if statement. Part of XI-6523 --- app/controllers/users/nbp_wallet_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users/nbp_wallet_controller.rb b/app/controllers/users/nbp_wallet_controller.rb index c133930ac..e8256ef10 100644 --- a/app/controllers/users/nbp_wallet_controller.rb +++ b/app/controllers/users/nbp_wallet_controller.rb @@ -38,7 +38,7 @@ def relationship_status def finalize relationship = Enmeshed::Relationship.pending_for(@provider_uid) - abort_and_refresh(relationship) and return if relationship.blank? + return abort_and_refresh(relationship) if relationship.blank? accept_and_create_user(relationship) rescue Enmeshed::ConnectorError, Faraday::Error => e