Skip to content

Commit 7f16d00

Browse files
committed
tx fix
1 parent f53cb41 commit 7f16d00

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

pkg/chart/ChartService.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -982,11 +982,6 @@ func (impl *ChartServiceImpl) ConfigureGitOpsRepoUrlForApp(appId int, repoUrl, c
982982
if err != nil {
983983
return nil, err
984984
}
985-
err = impl.chartRepository.CommitTx(tx)
986-
if err != nil {
987-
impl.logger.Errorw("error in committing transaction to update charts", "error", err)
988-
return nil, err
989-
}
990985

991986
deploymentConfig, err := impl.deploymentConfigService.GetConfigForDevtronApps(tx, appId, 0)
992987
if err != nil {
@@ -1002,6 +997,12 @@ func (impl *ChartServiceImpl) ConfigureGitOpsRepoUrlForApp(appId int, repoUrl, c
1002997
return nil, err
1003998
}
1004999

1000+
err = impl.chartRepository.CommitTx(tx)
1001+
if err != nil {
1002+
impl.logger.Errorw("error in committing transaction to update charts", "error", err)
1003+
return nil, err
1004+
}
1005+
10051006
return deploymentConfig, nil
10061007
}
10071008

0 commit comments

Comments
 (0)