From 09fff9e1c194a78eba781dae1f3d63df00a4aa04 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 14 Aug 2017 10:45:06 +0800 Subject: [PATCH] fix 500 error when view an issue which's milestone deleted (#2297) (#2299) --- models/issue.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/issue.go b/models/issue.go index c740d8fec..e95faf916 100644 --- a/models/issue.go +++ b/models/issue.go @@ -146,7 +146,7 @@ func (issue *Issue) loadAttributes(e Engine) (err error) { if issue.Milestone == nil && issue.MilestoneID > 0 { issue.Milestone, err = getMilestoneByRepoID(e, issue.RepoID, issue.MilestoneID) - if err != nil { + if err != nil && !IsErrMilestoneNotExist(err) { return fmt.Errorf("getMilestoneByRepoID [repo_id: %d, milestone_id: %d]: %v", issue.RepoID, issue.MilestoneID, err) } }