From 9201250f74cdca4fc505f4f56ccbfb154238ba5c Mon Sep 17 00:00:00 2001 From: Norwin Date: Mon, 6 Sep 2021 18:45:24 +0800 Subject: [PATCH] fix printing issue deadline (#388) fixes #387 Reviewed-on: https://gitea.com/gitea/tea/pulls/388 Reviewed-by: Lunny Xiao Reviewed-by: 6543 <6543@obermui.de> Co-authored-by: Norwin Co-committed-by: Norwin --- modules/print/issue.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/print/issue.go b/modules/print/issue.go index 340aabb..5e52898 100644 --- a/modules/print/issue.go +++ b/modules/print/issue.go @@ -101,6 +101,9 @@ func (x printableIssue) FormatField(field string) string { case "updated": return FormatTime(x.Updated) case "deadline": + if x.Deadline == nil { + return "" + } return FormatTime(*x.Deadline) case "milestone": if x.Milestone != nil {