aboutsummaryrefslogtreecommitdiffstats
path: root/services/release/release.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-02-03 16:47:04 +0800
committerGitHub <noreply@github.com>2020-02-03 09:47:04 +0100
commit48ce135cc9d54d1c5cf876411453414a53183968 (patch)
treee87064c6693e135d4732ba8c8289a267e560d985 /services/release/release.go
parente959d1a48baf6a59943949e0d6840e1512cd8934 (diff)
downloadgitea-48ce135cc9d54d1c5cf876411453414a53183968.tar.gz
gitea-48ce135cc9d54d1c5cf876411453414a53183968.zip
Move PushUpdateAddDeleteTags to repository module from models (#10106)
* Move PushUpdateAddDeleteTags to repository module from models * Fix deadlock on sqlite
Diffstat (limited to 'services/release/release.go')
-rw-r--r--services/release/release.go4
1 files changed, 2 insertions, 2 deletions
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)
}
}