diff options
author | Bo-Yi Wu <appleboy.tw@gmail.com> | 2017-01-25 22:54:52 +0800 |
---|---|---|
committer | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2017-01-25 16:40:43 +0100 |
commit | 691fbdf1d362e77ab5eb2c42e51844b54a69b058 (patch) | |
tree | bba6615b967afd741b53ff30c1f897e259dcbcaf /models | |
parent | 2831267db1908d8d721b0791c1e963a994802172 (diff) | |
download | gitea-691fbdf1d362e77ab5eb2c42e51844b54a69b058.tar.gz gitea-691fbdf1d362e77ab5eb2c42e51844b54a69b058.zip |
fix: delete attachment after remove comment.
Diffstat (limited to 'models')
-rw-r--r-- | models/issue_comment.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go index a17be97e72..bab002fcad 100644 --- a/models/issue_comment.go +++ b/models/issue_comment.go @@ -462,7 +462,9 @@ func DeleteComment(comment *Comment) error { return err } - if _, err := sess.Id(comment.ID).Delete(new(Comment)); err != nil { + if _, err := sess.Delete(&Comment{ + ID: comment.ID, + }); err != nil { return err } |