1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-24 17:44:27 +00:00

correct transaction ending (#17151)

Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
This commit is contained in:
Alexey 〒erentyev 2021-09-25 18:45:39 +03:00 committed by GitHub
parent 4b6556565f
commit 9cf5739c0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {