fix bug when deleting a release

This commit is contained in:
Lunny Xiao 2018-06-10 13:05:59 +08:00
parent af57d6ab8a
commit 06daffc42e
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A

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,