diff options
author | Unknwon <u@gogs.io> | 2017-06-02 17:30:15 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-06-02 17:30:15 -0400 |
commit | 6bb9c442b2d95bf683702c089085bb50b987818f (patch) | |
tree | 480af511bf91127f139e3f1222335b1fd4f72334 /models | |
parent | c4079216440af73c03343f53a6a4734688c87b60 (diff) |
issue: fix updated_unix is not updated for new comments (#4462)
Diffstat (limited to 'models')
-rw-r--r-- | models/comment.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/models/comment.go b/models/comment.go index 673ca780..be29e2ba 100644 --- a/models/comment.go +++ b/models/comment.go @@ -275,7 +275,10 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err if err != nil { return nil, err } + } + if _, err = e.Exec("UPDATE `issue` SET updated_unix = ? WHERE id = ?", time.Now().Unix(), opts.Issue.ID); err != nil { + return nil, fmt.Errorf("update issue 'updated_unix': %v", err) } // Notify watchers for whatever action comes in, ignore if no action type. |