diff options
Diffstat (limited to 'models/repo/repo_unit.go')
-rw-r--r-- | models/repo/repo_unit.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/models/repo/repo_unit.go b/models/repo/repo_unit.go index de79eb1c9f..a73678c6ef 100644 --- a/models/repo/repo_unit.go +++ b/models/repo/repo_unit.go @@ -5,6 +5,7 @@ package repo import ( + "context" "fmt" "code.gitea.io/gitea/models/db" @@ -206,9 +207,9 @@ func (r *RepoUnit) ExternalTrackerConfig() *ExternalTrackerConfig { return r.Config.(*ExternalTrackerConfig) } -func getUnitsByRepoID(e db.Engine, repoID int64) (units []*RepoUnit, err error) { +func getUnitsByRepoID(ctx context.Context, repoID int64) (units []*RepoUnit, err error) { var tmpUnits []*RepoUnit - if err := e.Where("repo_id = ?", repoID).Find(&tmpUnits); err != nil { + if err := db.GetEngine(ctx).Where("repo_id = ?", repoID).Find(&tmpUnits); err != nil { return nil, err } |