diff --git a/services/archiver/archiver.go b/services/archiver/archiver.go index 00c0281306..d64ec2bdea 100644 --- a/services/archiver/archiver.go +++ b/services/archiver/archiver.go @@ -132,9 +132,11 @@ func doArchive(r *ArchiveRequest) (*models.RepoArchiver, error) { if err == nil { if archiver.Status == models.RepoArchiverGenerating { archiver.Status = models.RepoArchiverReady - return archiver, models.UpdateRepoArchiverStatus(ctx, archiver) + if err = models.UpdateRepoArchiverStatus(ctx, archiver); err != nil { + return nil, err + } } - return archiver, nil + return archiver, commiter.Commit() } if !errors.Is(err, os.ErrNotExist) {