@@ -367,7 +367,7 @@ func (impl *PropertiesConfigServiceImpl) UpdateEnvironmentProperties(appId int,
367
367
}
368
368
369
369
if ! oldEnvOverride .Latest {
370
- envOverrideExisting , err := impl .envConfigOverrideReadService .FindLatestChartForAppByAppIdAndEnvId (nil , appId , oldEnvOverride .TargetEnvironment )
370
+ envOverrideExisting , err := impl .envConfigOverrideReadService .FindLatestChartForAppByAppIdAndEnvId (tx , appId , oldEnvOverride .TargetEnvironment )
371
371
if err != nil && ! errors .IsNotFound (err ) {
372
372
return nil , err
373
373
}
@@ -507,7 +507,7 @@ func (impl *PropertiesConfigServiceImpl) CreateIfRequired(request *bean.Environm
507
507
if errors .IsNotFound (err ) {
508
508
if isOverride {
509
509
// before creating new entry, remove previous one from latest tag
510
- envOverrideExisting , err := impl .envConfigOverrideReadService .FindLatestChartForAppByAppIdAndEnvId (nil , chart .AppId , environmentId )
510
+ envOverrideExisting , err := impl .envConfigOverrideReadService .FindLatestChartForAppByAppIdAndEnvId (tx , chart .AppId , environmentId )
511
511
if err != nil && ! errors .IsNotFound (err ) {
512
512
return nil , isAppMetricsEnabled , err
513
513
}
@@ -687,7 +687,7 @@ func (impl *PropertiesConfigServiceImpl) ResetEnvironmentProperties(id int, user
687
687
return false , err
688
688
}
689
689
690
- chart , err := impl .chartRepo .FindLatestChartForAppByAppId (nil , envOverride .Chart .AppId )
690
+ chart , err := impl .chartRepo .FindLatestChartForAppByAppId (tx , envOverride .Chart .AppId )
691
691
if err != nil {
692
692
impl .logger .Errorw ("error in chartRefRepository.FindById" , "chartRefId" , envOverride .Chart .ChartRefId , "err" , err )
693
693
return false , err
0 commit comments