From be14e79e9884dca98147fbc24f8b336b9b84ac86 Mon Sep 17 00:00:00 2001 From: qwerty287 <80460567+qwerty287@users.noreply.github.com> Date: Sun, 4 Sep 2022 16:01:23 +0200 Subject: [PATCH] Fix 500 on time tracking in timeline API (#21052) Fix #21041 --- modules/convert/issue_comment.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/convert/issue_comment.go b/modules/convert/issue_comment.go index ccc94b2496..73ad345fa4 100644 --- a/modules/convert/issue_comment.go +++ b/modules/convert/issue_comment.go @@ -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) }