summaryrefslogtreecommitdiffstats
path: root/models/issue.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-10-05 07:49:11 +0100
committerGitHub <noreply@github.com>2020-10-05 09:49:11 +0300
commit5e1c51cdb66e3aee57d2e19d43cfb1a03959096f (patch)
treea924e57c69e2354dffa498eaba52158ab9d4faab /models/issue.go
parentcda44750cbdc7a8460666a4f0ac7f652d84a3964 (diff)
downloadgitea-5e1c51cdb66e3aee57d2e19d43cfb1a03959096f.tar.gz
gitea-5e1c51cdb66e3aee57d2e19d43cfb1a03959096f.zip
(Re)Load issue labels when changing them (#13007)
(Re)Load issue labels when labels are added or removed This means that the label state that the webhooks produce accurately matches the changes that they are reporting. Fix #10660 Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'models/issue.go')
-rw-r--r--models/issue.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/models/issue.go b/models/issue.go
index 82bd21455b..ee75623f53 100644
--- a/models/issue.go
+++ b/models/issue.go
@@ -549,6 +549,11 @@ func (issue *Issue) ReplaceLabels(labels []*Label, doer *User) (err error) {
}
}
+ issue.Labels = nil
+ if err = issue.loadLabels(sess); err != nil {
+ return err
+ }
+
return sess.Commit()
}