summaryrefslogtreecommitdiffstats
path: root/models/release.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2018-06-13 00:44:17 +0800
committertechknowlogick <techknowlogick@users.noreply.github.com>2018-06-12 12:44:17 -0400
commit406031d3ccbf844a400f8382c84c5bee3f46d98b (patch)
tree08a23fc4ddbd436e7b7d605f68b8030896185ee5 /models/release.go
parent908e8942ccae5b7966c7084780b3441e2190d9c1 (diff)
downloadgitea-406031d3ccbf844a400f8382c84c5bee3f46d98b.tar.gz
gitea-406031d3ccbf844a400f8382c84c5bee3f46d98b.zip
fix bug when deleting a release (#4207)
Diffstat (limited to 'models/release.go')
-rw-r--r--models/release.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/models/release.go b/models/release.go
index 630995a741..e3760e9ef7 100644
--- a/models/release.go
+++ b/models/release.go
@@ -448,6 +448,11 @@ func DeleteReleaseByID(id int64, u *User, delTag bool) error {
}
}
+ rel.Repo = repo
+ if err = rel.LoadAttributes(); err != nil {
+ return fmt.Errorf("LoadAttributes: %v", err)
+ }
+
mode, _ := accessLevel(x, u.ID, rel.Repo)
if err := PrepareWebhooks(rel.Repo, HookEventRelease, &api.ReleasePayload{
Action: api.HookReleaseDeleted,