Skip to content

Commit

Permalink
Fix legacy detection
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Oct 30, 2024
1 parent 6d0f840 commit efc2d20
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions services/convert/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,7 @@ func ToAPIMilestone(m *issues_model.Milestone) *api.Milestone {
if m.IsClosed {
apiMilestone.Closed = m.ClosedDateUnix.AsTimePtr()
}
// for legacy reasons, all years after 9000 are considered as no deadline
if m.DeadlineUnix.Year() > 9000 || m.DeadlineUnix == 0 {
apiMilestone.Deadline = nil
} else {
if m.DeadlineUnix > 0 {
apiMilestone.Deadline = m.DeadlineUnix.AsTimePtr()
}
return apiMilestone
Expand Down

0 comments on commit efc2d20

Please sign in to comment.