aboutsummaryrefslogtreecommitdiff
path: root/models/attachment.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2018-08-16 20:17:19 +0800
committerUnknwon <u@gogs.io>2018-08-16 20:17:19 +0800
commitde10d9be08034ff285480c14b86be0c1824df16b (patch)
treebbb2c0908c8b6b51c97754d44675bbddbe1da834 /models/attachment.go
parent3c227af508b085f9113c36892ce9c52b940761f9 (diff)
models: fix delete undesired release attachments when delete a comment (#4627)
Apparently, AfterDelete has ID=0
Diffstat (limited to 'models/attachment.go')
-rw-r--r--models/attachment.go2
1 files changed, 0 insertions, 2 deletions
diff --git a/models/attachment.go b/models/attachment.go
index 31ca7f3e..e053ebff 100644
--- a/models/attachment.go
+++ b/models/attachment.go
@@ -165,7 +165,6 @@ func DeleteAttachments(attachments []*Attachment, remove bool) (int, error) {
// DeleteAttachmentsByIssue deletes all attachments associated with the given issue.
func DeleteAttachmentsByIssue(issueId int64, remove bool) (int, error) {
attachments, err := GetAttachmentsByIssueID(issueId)
-
if err != nil {
return 0, err
}
@@ -176,7 +175,6 @@ func DeleteAttachmentsByIssue(issueId int64, remove bool) (int, error) {
// DeleteAttachmentsByComment deletes all attachments associated with the given comment.
func DeleteAttachmentsByComment(commentId int64, remove bool) (int, error) {
attachments, err := GetAttachmentsByCommentID(commentId)
-
if err != nil {
return 0, err
}