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 --- services/release/release.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'services/release') diff --git a/services/release/release.go b/services/release/release.go index 0f19db9ee2..cc3b98afac 100644 --- a/services/release/release.go +++ b/services/release/release.go @@ -102,7 +102,7 @@ func UpdateRelease(doer *models.User, gitRepo *git.Repository, rel *models.Relea } rel.LowerTagName = strings.ToLower(rel.TagName) - if err = models.UpdateRelease(rel); err != nil { + if err = models.UpdateRelease(models.DefaultDBContext(), rel); err != nil { return err } @@ -145,7 +145,7 @@ func DeleteReleaseByID(id int64, doer *models.User, delTag bool) error { rel.Title = "" rel.Note = "" - if err = models.UpdateRelease(rel); err != nil { + if err = models.UpdateRelease(models.DefaultDBContext(), rel); err != nil { return fmt.Errorf("Update: %v", err) } } -- cgit v1.2.3