From d3086a077043b56e571c06b565ca99b6b8e63f75 Mon Sep 17 00:00:00 2001 From: karamaru-alpha Date: Thu, 19 Oct 2023 14:10:17 +0900 Subject: [PATCH] Fix return error by function Signed-off-by: karamaru-alpha --- pkg/model/project.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/pkg/model/project.go b/pkg/model/project.go index 1a3753f9ca..d7752bbb3d 100644 --- a/pkg/model/project.go +++ b/pkg/model/project.go @@ -233,10 +233,7 @@ func (p *ProjectSSOConfig) Encrypt(encrypter encrypter) error { if p.Github == nil { return nil } - if err := p.Github.Encrypt(encrypter); err != nil { - return err - } - return nil + return p.Github.Encrypt(encrypter) } // Decrypt decrypts encrypted data in ProjectSSOConfig. @@ -244,10 +241,7 @@ func (p *ProjectSSOConfig) Decrypt(decrypter decrypter) error { if p.Github == nil { return nil } - if err := p.Github.Decrypt(decrypter); err != nil { - return err - } - return nil + return p.Github.Decrypt(decrypter) } // GenerateAuthCodeURL generates an auth URL for the specified configuration.