From 48ce135cc9d54d1c5cf876411453414a53183968 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 3 Feb 2020 16:47:04 +0800 Subject: Move PushUpdateAddDeleteTags to repository module from models (#10106) * Move PushUpdateAddDeleteTags to repository module from models * Fix deadlock on sqlite --- routers/repo/repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routers') diff --git a/routers/repo/repo.go b/routers/repo/repo.go index 6b6b22f3a1..5177add99c 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -420,7 +420,7 @@ func RedirectDownload(ctx *context.Context) { ) tagNames := []string{vTag} curRepo := ctx.Repo.Repository - releases, err := models.GetReleasesByRepoIDAndNames(curRepo.ID, tagNames) + releases, err := models.GetReleasesByRepoIDAndNames(models.DefaultDBContext(), curRepo.ID, tagNames) if err != nil { if models.IsErrAttachmentNotExist(err) { ctx.Error(404) -- cgit v1.2.3