Skip to content

Commit

Permalink
Fix 500 on time tracking in timeline API (#21052)
Browse files Browse the repository at this point in the history
Fix #21041
  • Loading branch information
qwerty287 authored Sep 4, 2022
1 parent e6b3be4 commit be14e79
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/convert/issue_comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ func ToTimelineComment(c *issues_model.Comment, doer *user_model.User) *api.Time
}

if c.Time != nil {
err = c.Time.LoadAttributes()
if err != nil {
log.Error("Time.LoadAttributes: %v", err)
return nil
}

comment.TrackedTime = ToTrackedTime(c.Time)
}

Expand Down

0 comments on commit be14e79

Please sign in to comment.