Skip to content

Commit

Permalink
Fix assets key on release webhook (#8253)
Browse files Browse the repository at this point in the history
* Fix assets key on release webhook

* Fix assets key on release webhook

* Add message to log on AddReleaseAttachments failure
  • Loading branch information
danielflira authored and lunny committed Sep 24, 2019
1 parent 5a438ee commit 7cccada
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions services/release/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 7cccada

Please sign in to comment.