Skip to content

Commit

Permalink
Fix lint/go errors (gosimple)
Browse files Browse the repository at this point in the history
Signed-off-by: karamaru-alpha <[email protected]>
  • Loading branch information
karamaru-alpha committed Oct 19, 2023
1 parent 7351829 commit a576384
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions pkg/model/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,17 +218,14 @@ func (p *ProjectSSOConfig) RedactSensitiveData() {
// Update updates ProjectSSOConfig with given data.
func (p *ProjectSSOConfig) Update(sso *ProjectSSOConfig) error {
p.Provider = sso.Provider
if sso.Github != nil {
if p.Github == nil {
p.Github = &ProjectSSOConfig_GitHub{}
}
if err := p.Github.Update(sso.Github); err != nil {
return err
}
if sso.Github == nil {
return nil
}
if sso.Google != nil {

if p.Github == nil {
p.Github = &ProjectSSOConfig_GitHub{}
}
return nil
return p.Github.Update(sso.Github)
}

// Encrypt encrypts sensitive data in ProjectSSOConfig.
Expand Down

0 comments on commit a576384

Please sign in to comment.