Skip to content

Commit 7142a95

Browse files
committed
fix UpdateRun logic
1 parent 3a60c3d commit 7142a95

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

models/actions/run.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package actions
55

66
import (
7+
"code.gitea.io/gitea/modules/setting"
78
"context"
89
"errors"
910
"fmt"
@@ -420,10 +421,7 @@ func UpdateRun(ctx context.Context, run *ActionRun, cols ...string) error {
420421

421422
if run.Status != 0 || slices.Contains(cols, "status") {
422423
if run.RepoID == 0 {
423-
run, err = GetRunByRepoAndID(ctx, run.RepoID, run.ID)
424-
if err != nil {
425-
return err
426-
}
424+
setting.PanicInDevOrTesting("RepoID should not be 0")
427425
}
428426
if err = run.LoadRepo(ctx); err != nil {
429427
return err

0 commit comments

Comments
 (0)