mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-29 13:14:02 +01:00
Fix ambiguous id when fetch Actions tasks (#30382)
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" ``` (cherry picked from commit 310e2517e5d55a037f612a8561fb1850b517b37f)
This commit is contained in:
parent
da7396110b
commit
63c707b38b
1 changed files with 1 additions and 1 deletions
|
@ -228,7 +228,7 @@ func CreateTaskForRunner(ctx context.Context, runner *ActionRunner) (*ActionTask
|
||||||
if runner.RepoID != 0 {
|
if runner.RepoID != 0 {
|
||||||
jobCond = builder.Eq{"repo_id": runner.RepoID}
|
jobCond = builder.Eq{"repo_id": runner.RepoID}
|
||||||
} else if runner.OwnerID != 0 {
|
} else if runner.OwnerID != 0 {
|
||||||
jobCond = builder.In("repo_id", builder.Select("id").From("repository").
|
jobCond = builder.In("repo_id", builder.Select("`repository`.id").From("repository").
|
||||||
Join("INNER", "repo_unit", "`repository`.id = `repo_unit`.repo_id").
|
Join("INNER", "repo_unit", "`repository`.id = `repo_unit`.repo_id").
|
||||||
Where(builder.Eq{"`repository`.owner_id": runner.OwnerID, "`repo_unit`.type": unit.TypeActions}))
|
Where(builder.Eq{"`repository`.owner_id": runner.OwnerID, "`repo_unit`.type": unit.TypeActions}))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue