aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-08-12 10:15:30 +0800
committerGitHub <noreply@github.com>2017-08-12 10:15:30 +0800
commit921d90fd8b929533e30c896923cb3a6f3d33f45a (patch)
tree5ebcf54d0b09dd50b036ded2e2c4fbb0cac82a35 /models
parentbe29d5f7ad079100f0018940a3e06be48ab7be42 (diff)
downloadgitea-921d90fd8b929533e30c896923cb3a6f3d33f45a.tar.gz
gitea-921d90fd8b929533e30c896923cb3a6f3d33f45a.zip
fix 500 error when view an issue which's milestone deleted (#2297)
Diffstat (limited to 'models')
-rw-r--r--models/issue.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/issue.go b/models/issue.go
index 709ebc35f9..2c385fd066 100644
--- a/models/issue.go
+++ b/models/issue.go
@@ -176,7 +176,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)
}
}