Skip to content

Commit 189cfc1

Browse files
GiteaBotwolfogre
andauthored
Fix ambiguous id when fetch Actions tasks (#30382) (#30383)
Backport #30382 by @wolfogre Fix regression of #30331. ```txt time="2024-04-10T02:23:49Z" level=error msg="failed to fetch task" func="[fetchTask]" file="[poller.go:91]" error="unknown: rpc error: code = Internal desc = pick task: CreateTaskForRunner: Error 1052 (23000): Column 'id' in field list is ambiguous" ``` I have tested it in my local env, and it should work now. Co-authored-by: Jason Song <[email protected]>
1 parent 9a18dcb commit 189cfc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/actions/task.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ func CreateTaskForRunner(ctx context.Context, runner *ActionRunner) (*ActionTask
228228
if runner.RepoID != 0 {
229229
jobCond = builder.Eq{"repo_id": runner.RepoID}
230230
} else if runner.OwnerID != 0 {
231-
jobCond = builder.In("repo_id", builder.Select("id").From("repository").
231+
jobCond = builder.In("repo_id", builder.Select("`repository`.id").From("repository").
232232
Join("INNER", "repo_unit", "`repository`.id = `repo_unit`.repo_id").
233233
Where(builder.Eq{"`repository`.owner_id": runner.OwnerID, "`repo_unit`.type": unit.TypeActions}))
234234
}

0 commit comments

Comments
 (0)