summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorqwerty287 <80460567+qwerty287@users.noreply.github.com>2022-09-04 16:01:23 +0200
committerGitHub <noreply@github.com>2022-09-04 15:01:23 +0100
commitbe14e79e9884dca98147fbc24f8b336b9b84ac86 (patch)
tree09d0fae36760ed4814e45135d46856764319b682 /modules
parente6b3be460840f1f982d5358198466e7d6f509d21 (diff)
downloadgitea-be14e79e9884dca98147fbc24f8b336b9b84ac86.tar.gz
gitea-be14e79e9884dca98147fbc24f8b336b9b84ac86.zip
Fix 500 on time tracking in timeline API (#21052)
Fix #21041
Diffstat (limited to 'modules')
-rw-r--r--modules/convert/issue_comment.go6
1 files changed, 6 insertions, 0 deletions
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)
}