Skip to content

Commit 0bac822

Browse files
ensure we return early if there was an error loading group units
1 parent 5f50e98 commit 0bac822

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

models/group/group_team.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ func (g *RepoGroupTeam) UnitAccessModeEx(ctx context.Context, tp unit.Type) (acc
3434
accessMode = perm.AccessModeNone
3535
if err := g.LoadGroupUnits(ctx); err != nil {
3636
log.Warn("Error loading units of team for group[%d] (ID: %d): %s", g.GroupID, g.TeamID, err.Error())
37+
return accessMode, false
3738
}
3839
for _, u := range g.Units {
3940
if u.Type == tp {

0 commit comments

Comments
 (0)