mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
Co-authored-by: 6543 <[email protected]> Co-authored-by: Lauris BH <[email protected]> Co-authored-by: techknowlogick <[email protected]>
This commit is contained in:
co-authored by
6543
Lauris BH
techknowlogick
parent
b6bb3891fd
commit
6c218f7a5c
@@ -23,6 +23,11 @@ func GenerateIssueLabels(ctx context.Context, templateRepo, generateRepo *repo_m
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Prevent insert being called with an empty slice which would result in
|
||||
// err "no element on slice when insert".
|
||||
if len(templateLabels) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
newLabels := make([]*issues_model.Label, 0, len(templateLabels))
|
||||
for _, templateLabel := range templateLabels {
|
||||
|
||||
Reference in New Issue
Block a user