From 6a702a4e3213d83d79f7824c0c830d6c75d99100 Mon Sep 17 00:00:00 2001 From: "tim.abramson" Date: Wed, 1 Feb 2023 14:41:01 -0600 Subject: [PATCH 1/2] fix `send-to` w/ checkpoint and v2 json events --- src/code42cli/cmds/securitydata.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/code42cli/cmds/securitydata.py b/src/code42cli/cmds/securitydata.py index 03c637bc..0a0a2b77 100644 --- a/src/code42cli/cmds/securitydata.py +++ b/src/code42cli/cmds/securitydata.py @@ -513,6 +513,8 @@ def send_to( if state.profile.use_v2_file_events != "True": deprecation_warning(DEPRECATION_TEXT) + flatten = format in (OutputFormat.TABLE, OutputFormat.CSV) + if use_checkpoint: cursor = _get_file_event_cursor_store(state.profile.name) checkpoint = _handle_timestamp_checkpoint(cursor.get(use_checkpoint), state) @@ -520,7 +522,8 @@ def send_to( if state.profile.use_v2_file_events == "True": def checkpoint_func(event): - cursor.replace(use_checkpoint, event["event.id"]) + event_id = event["event.id"] if flatten else event["event"]["id"] + cursor.replace(use_checkpoint, event_id) else: From b685fd3ebca5998abdca8353312d0296e3a36927 Mon Sep 17 00:00:00 2001 From: "tim.abramson" Date: Wed, 1 Feb 2023 14:42:29 -0600 Subject: [PATCH 2/2] bump version for release --- CHANGELOG.md | 2 +- src/code42cli/__version__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee6f06fa..bcba330d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ The intended audience of this file is for py42 consumers -- as such, changes tha how a consumer would use the library (e.g. adding unit tests, updating documentation, etc) are not captured here. -## 1.16.3 - 2023-02-01 +## 1.16.5 - 2023-02-01 ### Fixed diff --git a/src/code42cli/__version__.py b/src/code42cli/__version__.py index 67f76446..9e1406d5 100644 --- a/src/code42cli/__version__.py +++ b/src/code42cli/__version__.py @@ -1 +1 @@ -__version__ = "1.16.4" +__version__ = "1.16.5"