@@ -75,13 +75,13 @@ func LoadProjectIntegrationByNameWithClearPassword(db gorp.SqlExecutor, key stri
7575}
7676
7777// LoadProjectIntegrationByID returns integration, selecting by its id
78- func LoadProjectIntegrationByID (db gorp.SqlExecutor , id int64 , clearPassword bool ) (* sdk.ProjectIntegration , error ) {
78+ func LoadProjectIntegrationByID (db gorp.SqlExecutor , id int64 ) (* sdk.ProjectIntegration , error ) {
7979 query := gorpmapping .NewQuery ("SELECT * from project_integration WHERE id = $1" ).Args (id )
8080 pp , err := load (db , query )
8181 return & pp , err
8282}
8383
84- func LoadProjectIntegrationByIDWithClearPassword (db gorp.SqlExecutor , id int64 , clearPassword bool ) (* sdk.ProjectIntegration , error ) {
84+ func LoadProjectIntegrationByIDWithClearPassword (db gorp.SqlExecutor , id int64 ) (* sdk.ProjectIntegration , error ) {
8585 query := gorpmapping .NewQuery ("SELECT * from project_integration WHERE id = $1" ).Args (id )
8686 pp , err := loadWithClearPassword (db , query )
8787 return & pp , err
@@ -174,9 +174,9 @@ func UpdateIntegration(db gorp.SqlExecutor, pp sdk.ProjectIntegration) error {
174174 for k , cfg := range givenConfig {
175175 if cfg .Type == sdk .IntegrationConfigTypePassword && cfg .Value == sdk .PasswordPlaceholder {
176176 if oldConfig == nil {
177- // reload the previous config to encuse we don't store placeholder
177+ // reload the previous config to ensure we don't store placeholder
178178 var err error
179- oldConfig , err = LoadProjectIntegrationByID (db , pp .ID , true )
179+ oldConfig , err = LoadProjectIntegrationByIDWithClearPassword (db , pp .ID )
180180 if err != nil {
181181 return err
182182 }
0 commit comments