Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
how a consumer would use the library or CLI tool (e.g. adding unit tests, updating documentation, etc) are not captured
here.

## 2.12.7 - 2026-11-02
- Fixed an issue where some event queries would not serialize correctly.

## 2.12.6 - 2026-10-23

### Security
Expand Down
2 changes: 1 addition & 1 deletion src/_incydr_sdk/__version__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022-present Code42 Software <integrations@code42.com>
#
# SPDX-License-Identifier: MIT
__version__ = "2.12.6"
__version__ = "2.12.7"
2 changes: 1 addition & 1 deletion src/_incydr_sdk/queries/file_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class BaseEventQuery(Model):
"""

group_clause: str = Field("AND", alias="groupClause")
groups: Optional[List[FilterGroup]]
groups: Optional[List[Union[FilterGroupV2, FilterGroup]]]
model_config = ConfigDict(
validate_assignment=True,
use_enum_values=True,
Expand Down
7 changes: 7 additions & 0 deletions tests/queries/test_event_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,13 @@ def test_event_query_from_saved_search_creates_expected_filter_groups():
assert isinstance(q.groups[2], FilterGroupV2)


def test_event_query_from_saved_search_serializes_both_filter_group_types():
q = EventQuery().from_saved_search(TEST_SAVED_SEARCH)
dumped = q.model_dump()
for i in range(len(q.groups)):
assert q.groups[i].model_dump() == dumped["groups"][i]


def test_event_query_is_any_creates_correct_filter():
q = EventQuery().is_any("term", ["value1", "value2"])
expected = FilterGroup(
Expand Down
Loading