Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-22 09:54:24 +01:00

Fix assets key on release webhook (#8253)

* Fix assets key on release webhook

* Fix assets key on release webhook

* Add message to log on AddReleaseAttachments failure
This commit is contained in:
Daniel Fonseca de Lira 2019-09-24 03:55:07 -03:00 committed by Lunny Xiao
parent 5a438ee3c0
commit 7cccada51e

View file

@ -109,12 +109,14 @@ func UpdateRelease(doer *models.User, gitRepo *git.Repository, rel *models.Relea
return err
}
if err = models.AddReleaseAttachments(rel.ID, attachmentUUIDs); err != nil {
log.Error("AddReleaseAttachments: %v", err)
}
if err = rel.LoadAttributes(); err != nil {
return err
}
err = models.AddReleaseAttachments(rel.ID, attachmentUUIDs)
// even if attachments added failed, hooks will be still triggered
mode, _ := models.AccessLevel(doer, rel.Repo)
if err1 := models.PrepareWebhooks(rel.Repo, models.HookEventRelease, &api.ReleasePayload{