mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-26 10:14:08 +08:00
Foreign ID conflicts if ID is 0 for each item (#21271)
The default is 0 if not defined, and that causes dupe index errors Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
parent
f82f1d05b1
commit
9e2f37404c
|
@ -412,6 +412,10 @@ func (g *GiteaLocalUploader) CreateIssues(issues ...*base.Issue) error {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if is.ForeignReference.ForeignIndex == "0" {
|
||||||
|
is.ForeignReference.ForeignIndex = strconv.FormatInt(is.Index, 10)
|
||||||
|
}
|
||||||
|
|
||||||
if err := g.remapUser(issue, &is); err != nil {
|
if err := g.remapUser(issue, &is); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user