1
0
Fork 0
forked from forgejo/forgejo

Don't let API add 2 exclusive labels from same scope (#27433)

Fixes #27380
This commit is contained in:
JakobDev 2023-10-05 05:37:36 +02:00 committed by GitHub
parent 9f8d59858a
commit f2b2608a86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 40 additions and 1 deletions

View file

@ -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