fix openpitrix return non nil client when enpoint is empty (#2165)
This commit is contained in:
@@ -179,7 +179,7 @@ func (s *ServerRunOptions) NewAPIServer(stopCh <-chan struct{}) (*apiserver.APIS
|
||||
apiServer.AuditingClient = auditingClient
|
||||
}
|
||||
|
||||
if s.OpenPitrixOptions != nil {
|
||||
if s.OpenPitrixOptions != nil && !s.OpenPitrixOptions.IsEmpty() {
|
||||
opClient, err := openpitrix.NewClient(s.OpenPitrixOptions)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user