diff options
author | Giteabot <teabot@gitea.io> | 2023-10-06 05:06:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-06 05:06:31 +0800 |
commit | 44aca6a65a7c1765a765560e57e77be49ebec548 (patch) | |
tree | 449d7395eed4eaa951260b5f25dbffe5de01f417 /routers/api/v1/repo | |
parent | aaf35ee49c262ba4c1ce3e7fc0e3e6b7de84e35d (diff) | |
download | gitea-44aca6a65a7c1765a765560e57e77be49ebec548.tar.gz gitea-44aca6a65a7c1765a765560e57e77be49ebec548.zip |
Don't let API add 2 exclusive labels from same scope (#27433) (#27460)
Backport #27433 by @JakobDev
Fixes #27380
Co-authored-by: JakobDev <jakobdev@gmx.de>
Diffstat (limited to 'routers/api/v1/repo')
-rw-r--r-- | routers/api/v1/repo/issue_label.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/repo/issue_label.go b/routers/api/v1/repo/issue_label.go index 2f9ad7060c..c2f530956e 100644 --- a/routers/api/v1/repo/issue_label.go +++ b/routers/api/v1/repo/issue_label.go @@ -317,7 +317,7 @@ func prepareForReplaceOrAdd(ctx *context.APIContext, form api.IssueLabelsOption) return nil, nil, err } - labels, err := issues_model.GetLabelsByIDs(ctx, form.Labels, "id", "repo_id", "org_id") + labels, err := issues_model.GetLabelsByIDs(ctx, form.Labels, "id", "repo_id", "org_id", "name", "exclusive") if err != nil { ctx.Error(http.StatusInternalServerError, "GetLabelsByIDs", err) return nil, nil, err |