aboutsummaryrefslogtreecommitdiffstats
path: root/services/release
diff options
context:
space:
mode:
authorDaniel Fonseca de Lira <danielflira@gmail.com>2019-09-24 03:55:07 -0300
committerLunny Xiao <xiaolunwen@gmail.com>2019-09-24 14:55:07 +0800
commit7cccada51eb925e7acfc90aae26661afd847d8f4 (patch)
tree1f98e5d958b4155dad722feb68063a9b3ddb39a8 /services/release
parent5a438ee3c0303efcb9d1935ff521917fe8a109e8 (diff)
downloadgitea-7cccada51eb925e7acfc90aae26661afd847d8f4.tar.gz
gitea-7cccada51eb925e7acfc90aae26661afd847d8f4.zip
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
Diffstat (limited to 'services/release')
-rw-r--r--services/release/release.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/services/release/release.go b/services/release/release.go
index 4451633798..246a784efe 100644
--- a/services/release/release.go
+++ b/services/release/release.go
@@ -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{