Skip to content

Commit 9e2f374

Browse files
techknowlogick6543
andauthored
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 <[email protected]>
1 parent f82f1d0 commit 9e2f374

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: services/migrations/gitea_uploader.go

+4
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,10 @@ func (g *GiteaLocalUploader) CreateIssues(issues ...*base.Issue) error {
412412
},
413413
}
414414

415+
if is.ForeignReference.ForeignIndex == "0" {
416+
is.ForeignReference.ForeignIndex = strconv.FormatInt(is.Index, 10)
417+
}
418+
415419
if err := g.remapUser(issue, &is); err != nil {
416420
return err
417421
}

0 commit comments

Comments
 (0)