Fix missing license when sync mirror (#33255) (#33258)
Some checks are pending
release-nightly / nightly-binary (push) Waiting to run
release-nightly / nightly-docker-rootful (push) Waiting to run
release-nightly / nightly-docker-rootless (push) Waiting to run

Backport #33255 by yp05327

Fix #33222

Co-authored-by: yp05327 <576951401@qq.com>
This commit is contained in:
Giteabot 2025-01-14 14:26:27 +08:00 committed by GitHub
parent 80cc87b3d8
commit 2984a7c121
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,6 +54,7 @@ func UpdateRepoLicenses(ctx context.Context, repo *Repository, commitID string,
for _, o := range oldLicenses {
// Update already existing license
if o.License == license {
o.CommitID = commitID
if _, err := db.GetEngine(ctx).ID(o.ID).Cols("`commit_id`").Update(o); err != nil {
return err
}