0
0
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:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-08-16 17:05:33 -04:00
parent 3bbefda427
commit 6bb7598555
No known key found for this signature in database
GPG Key ID: 924A5F6AF051E87C

View File

@ -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 {