@@ -688,14 +688,6 @@ func (impl *ChartServiceImpl) UpdateAppOverride(ctx context.Context, templateReq
688
688
return nil , err
689
689
}
690
690
691
- if currentLatestChart .Id != 0 && currentLatestChart .Id != templateRequest .Id {
692
- err = impl .updateChartLocationForEnvironmentConfigs (newCtx , templateRequest .AppId , templateRequest .ChartRefId , templateRequest .UserId , template .ChartVersion )
693
- if err != nil {
694
- impl .logger .Errorw ("error in updating chart location in env overrides" , "appId" , templateRequest .AppId , "err" , err )
695
- return nil , err
696
- }
697
- }
698
-
699
691
config , err := impl .deploymentConfigService .GetConfigForDevtronApps (template .AppId , 0 )
700
692
if err != nil {
701
693
impl .logger .Errorw ("error in fetching config" , "appId" , template .AppId , "err" , err )
@@ -727,6 +719,14 @@ func (impl *ChartServiceImpl) UpdateAppOverride(ctx context.Context, templateReq
727
719
return nil , err
728
720
}
729
721
722
+ if currentLatestChart .Id != 0 && currentLatestChart .Id != templateRequest .Id {
723
+ err = impl .updateChartLocationForEnvironmentConfigs (newCtx , templateRequest .AppId , templateRequest .ChartRefId , templateRequest .UserId , template .ChartVersion )
724
+ if err != nil {
725
+ impl .logger .Errorw ("error in updating chart location in env overrides" , "appId" , templateRequest .AppId , "err" , err )
726
+ return nil , err
727
+ }
728
+ }
729
+
730
730
appLevelMetricsUpdateReq := & bean.DeployedAppMetricsRequest {
731
731
EnableMetrics : templateRequest .IsAppMetricsEnabled ,
732
732
AppId : templateRequest .AppId ,
0 commit comments