Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 82a3ea7

Browse files
author
Samuel Hassine
committed
[client] Fix connector state can be null
1 parent ca1b6cd commit 82a3ea7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pycti/connector/opencti_connector_helper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ def ping(self) -> None:
211211
result = self.api.connector.ping(self.connector_id, initial_state)
212212
remote_state = (
213213
json.loads(result["connector_state"])
214-
if len(result["connector_state"]) > 0
214+
if result["connector_state"] is not None
215+
and len(result["connector_state"]) > 0
215216
else None
216217
)
217218
if initial_state != remote_state:

0 commit comments

Comments
 (0)