Skip to content

Commit 11de0a1

Browse files
committed
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
1 parent bb8844f commit 11de0a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/users/nbp_wallet_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def relationship_status
3737

3838
def finalize
3939
relationship = Enmeshed::Relationship.pending_for(@provider_uid)
40-
abort_and_refresh(relationship) and return if relationship.blank?
40+
return abort_and_refresh(relationship) if relationship.blank?
4141

4242
accept_and_create_user(relationship)
4343
rescue Enmeshed::ConnectorError, Faraday::Error => e

0 commit comments

Comments
 (0)