forked from kevadesu/forgejo
Fix problem when database ID is not incremented as expected (#17229)
Although #17124 fixed the same issue for the feed, some other parts with the same issue were found. Co-authored-by: finga <finga@onders.org>
This commit is contained in:
parent
21a784e94a
commit
67bc04fe21
3 changed files with 3 additions and 3 deletions
|
@ -843,7 +843,7 @@ func (issue *Issue) GetLastEventLabel() string {
|
|||
func (issue *Issue) GetLastComment() (*Comment, error) {
|
||||
var c Comment
|
||||
exist, err := db.GetEngine(db.DefaultContext).Where("type = ?", CommentTypeComment).
|
||||
And("issue_id = ?", issue.ID).Desc("id").Get(&c)
|
||||
And("issue_id = ?", issue.ID).Desc("created_unix").Get(&c)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue