mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-04 05:45:23 +02:00
ensure we return early if there was an error loading group units
This commit is contained in:
parent
3bbefda427
commit
6bb7598555
@ -34,6 +34,7 @@ func (g *RepoGroupTeam) UnitAccessModeEx(ctx context.Context, tp unit.Type) (acc
|
||||
accessMode = perm.AccessModeNone
|
||||
if err := g.LoadGroupUnits(ctx); err != nil {
|
||||
log.Warn("Error loading units of team for group[%d] (ID: %d): %s", g.GroupID, g.TeamID, err.Error())
|
||||
return accessMode, false
|
||||
}
|
||||
for _, u := range g.Units {
|
||||
if u.Type == tp {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user