fix bug when deleting a release (#4207)

release/v1.15
Lunny Xiao 2018-06-13 00:44:17 +08:00 committed by techknowlogick
parent 908e8942cc
commit 406031d3cc
1 changed files with 5 additions and 0 deletions

View File

@ -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,