From 4672ddcdd7a9a1d27ebd4f22be0a911ccd3cb2c5 Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Tue, 14 Jan 2025 14:44:12 +0900 Subject: [PATCH] Fix missing license when sync mirror (#33255) Fix #33222 --- models/repo/license.go | 1 + 1 file changed, 1 insertion(+) diff --git a/models/repo/license.go b/models/repo/license.go index 366b4598cc4e0..9bcf0f7bc97f5 100644 --- a/models/repo/license.go +++ b/models/repo/license.go @@ -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 }