diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2017-02-11 20:56:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-11 20:56:57 +0800 |
commit | 8a0be5e9f01caaf3667c420f08541ac7c26127b8 (patch) | |
tree | a1f2cfc2e7fd4932cd350121746266c03506e86a /models/issue_comment.go | |
parent | 442145dbd348a18915de80faea68f30a9d9309b3 (diff) | |
download | gitea-8a0be5e9f01caaf3667c420f08541ac7c26127b8.tar.gz gitea-8a0be5e9f01caaf3667c420f08541ac7c26127b8.zip |
Bug fixed for deleted label in issue comment (#904)
* bug fixed for deleted label in issue comment
* fix indent
Diffstat (limited to 'models/issue_comment.go')
-rw-r--r-- | models/issue_comment.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go index 2eadba810b..e133cc049b 100644 --- a/models/issue_comment.go +++ b/models/issue_comment.go @@ -214,12 +214,13 @@ func (c *Comment) LoadLabel() error { has, err := x.ID(c.LabelID).Get(&label) if err != nil { return err - } else if !has { - return ErrLabelNotExist{ - LabelID: c.LabelID, - } + } else if has { + c.Label = &label + } else { + // Ignore Label is deleted, but not clear this table + log.Warn("Commit %d cannot load label %d", c.ID, c.LabelID) } - c.Label = &label + return nil } |