Skip to content

fix: remove identical if/else branch in GetRoleForOtherEntity (#6031) - #7033

Open
absaar-404 wants to merge 1 commit into
devtron-labs:mainfrom
absaar-404:fix/6031-identical-return-branches
Open

fix: remove identical if/else branch in GetRoleForOtherEntity (#6031)#7033
absaar-404 wants to merge 1 commit into
devtron-labs:mainfrom
absaar-404:fix/6031-identical-return-branches

Conversation

@absaar-404

Copy link
Copy Markdown

What

In GetRoleForOtherEntity, the else if team=="" && app=="" && env=="" && act=="" branch and the following else branch both returned model, nil. Removed the redundant else if so the final else handles that case.

Why

Reported by the revive linter (identical if/else branches). No behavior change.

Fixes #6031

The 'else if team=="" && app=="" && env=="" && act==""' branch and the
following 'else' branch both returned 'model, nil'. Removed the redundant
else-if so the final else handles that case.

Fixes devtron-labs#6031
@bito-code-review

Copy link
Copy Markdown

Bito Review Skipped - Source Branch Not Found

Bito didn't review this change because the pull request is no longer valid. It may have been merged, or the source/target branch may no longer exist.

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Both branches of if-then-else are identical

1 participant