diff options
Diffstat (limited to 'services/mirror')
-rw-r--r-- | services/mirror/mirror_pull.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/mirror/mirror_pull.go b/services/mirror/mirror_pull.go index 5bd08fa9bf..1c0bf2b595 100644 --- a/services/mirror/mirror_pull.go +++ b/services/mirror/mirror_pull.go @@ -11,6 +11,7 @@ import ( "time" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/cache" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/lfs" @@ -203,7 +204,7 @@ func runSync(ctx context.Context, m *models.Mirror) ([]*mirrorSyncResult, bool) gitRepo.Close() log.Trace("SyncMirrors [repo: %-v]: updating size of repository", m.Repo) - if err := m.Repo.UpdateSize(models.DefaultDBContext()); err != nil { + if err := m.Repo.UpdateSize(db.DefaultContext()); err != nil { log.Error("Failed to update size for mirror repository: %v", err) } |