summaryrefslogtreecommitdiffstats
path: root/models/issues
diff options
context:
space:
mode:
authorEarl Warren <contact@earl-warren.org>2024-11-06 15:36:02 +0100
committerEarl Warren <contact@earl-warren.org>2024-11-06 16:43:14 +0100
commitc801838690dc7c501e2331ba97ae3d5939a2830c (patch)
tree441fa15240b57588cb4ab3da1f79f59f0b452266 /models/issues
parentMerge pull request '[FEAT] Trim spaces from repo names on form submission' (#... (diff)
downloadforgejo-c801838690dc7c501e2331ba97ae3d5939a2830c.tar.xz
forgejo-c801838690dc7c501e2331ba97ae3d5939a2830c.zip
fix: labels are missing in the pull request payload removing a label
When ReplaceIssueLabels calls issue.LoadLabels it was a noop because issue.isLabelsLoaded is still set to true because of the call to issue.LoadLabels that was done at the beginning of the function.
Diffstat (limited to 'models/issues')
-rw-r--r--models/issues/issue_label.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/models/issues/issue_label.go b/models/issues/issue_label.go
index 10fc821454..2f0e2897a9 100644
--- a/models/issues/issue_label.go
+++ b/models/issues/issue_label.go
@@ -496,6 +496,7 @@ func ReplaceIssueLabels(ctx context.Context, issue *Issue, labels []*Label, doer
}
}
+ issue.isLabelsLoaded = false
issue.Labels = nil
if err = issue.LoadLabels(ctx); err != nil {
return err