Fix all bugs I found in the code

This commit is contained in:
Excellencedev committed 2025-12-20 05:46:33 +01:00
1 parent a5163fa5f2
commit 9c5b278622
9 files changed
+127 -106

No files matched your search

+8 -1
View File
@@ -272,7 +272,14 @@ func GetActionsUserRepoPermission(ctx context.Context, repo *repo_model.Reposito
return perm, err
}
actionsUnit := repo.MustGetUnit(ctx, unit.TypeActions)
actionsUnit, err := repo.GetUnit(ctx, unit.TypeActions)
if err != nil {
// If Actions unit doesn't exist, return empty permission
if repo_model.IsErrUnitTypeNotExist(err) {
return perm, nil
}
return perm, err
}
actionsCfg := actionsUnit.ActionsConfig()
if task.RepoID != repo.ID {