Skip to content

Commit ffd9567

Browse files
committed
Final fix for Sentinel payload
it should be a list of dictionaries instead of list of string
1 parent 289873b commit ffd9567

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cyber_connectors/MsSentinel.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ def write(self, iterator):
7474
cnt = 0
7575
for row in iterator:
7676
cnt += 1
77-
msgs.append(json.dumps(row.asDict(), cls=DateTimeJsonEncoder))
77+
# Workaround to convert datetime/date to string
78+
msgs.append(json.loads(json.dumps(row.asDict(), cls=DateTimeJsonEncoder)))
7879
if len(msgs) >= self.batch_size:
7980
self._send_to_sentinel(logs_client, msgs)
8081
msgs = []

0 commit comments

Comments
 (0)