fix printing issue deadline (#388)

fixes #387

Reviewed-on: https://gitea.com/gitea/tea/pulls/388
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
This commit is contained in:
Norwin 2021-09-06 18:45:24 +08:00 committed by 6543
parent 5b28a05eb7
commit 9201250f74
1 changed files with 3 additions and 0 deletions

View File

@ -101,6 +101,9 @@ func (x printableIssue) FormatField(field string) string {
case "updated": case "updated":
return FormatTime(x.Updated) return FormatTime(x.Updated)
case "deadline": case "deadline":
if x.Deadline == nil {
return ""
}
return FormatTime(*x.Deadline) return FormatTime(*x.Deadline)
case "milestone": case "milestone":
if x.Milestone != nil { if x.Milestone != nil {