Skip to content

Commit

Permalink
cherry pick app update operation
Browse files Browse the repository at this point in the history
  • Loading branch information
iamayushm committed Sep 27, 2024
1 parent 7f2c7b8 commit 71be38d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/app/AppCrudOperationService.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,9 @@ func (impl AppCrudOperationServiceImpl) getAppAndProjectForAppIdentifier(appIden
//find app by display name if not found by unique identifier
app, err = impl.appRepository.FindAppAndProjectByAppName(appIdentifier.ReleaseName)
if err == pg.ErrMultiRows {
validApp, err := impl.dbMigration.FixMultipleAppsForInstalledApp(appNameUniqueIdentifier)
validApp, err := impl.dbMigration.FixMultipleAppsForInstalledApp(appIdentifier.ReleaseName)
if err != nil {
impl.logger.Errorw("error in fixing multiple installed app entries", "appName", appNameUniqueIdentifier, "err", err)
impl.logger.Errorw("error in fixing multiple installed app entries", "appName", appIdentifier.ReleaseName, "err", err)
return app, err
}
return validApp, err
Expand Down
2 changes: 1 addition & 1 deletion util/rbac/EnforcerUtilHelm.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (impl EnforcerUtilHelmImpl) getAppObject(clusterId int, namespace string, a
appNameIdentifier := appIdentifier.GetUniqueAppNameIdentifier()
appObj, err := impl.appRepository.FindAppAndProjectByAppName(appNameIdentifier)
if err == pg.ErrMultiRows {
appObj, err = impl.dbMigration.FixMultipleAppsForInstalledApp(appName)
appObj, err = impl.dbMigration.FixMultipleAppsForInstalledApp(appNameIdentifier)
}
if appObj == nil || err == pg.ErrNoRows {
impl.logger.Warnw("appObj not found, going to find app using display name ", "appIdentifier", appNameIdentifier, "appName", appName)
Expand Down

0 comments on commit 71be38d

Please sign in to comment.