Foreign ID conflicts if ID is 0 for each item (#21271) (#21272)

The default is 0 if not defined, and that causes dupe index errors

Backport of #21271
tokarchuk/v1.17
techknowlogick 2 years ago committed by GitHub
parent 0e677d7b41
commit cbebcc1c26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      services/migrations/gitea_uploader.go

@ -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 {
return err
}

Loading…
Cancel
Save