correct transaction ending (#17151)
Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
This commit is contained in:
parent
4b6556565f
commit
9cf5739c0f
1 changed files with 4 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Reference in a new issue