Skip to content

Commit

Permalink
Avoid Matching Query on None (Salesforce Account Example) (#4483)
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveDMurphy committed Dec 11, 2023
1 parent 34e62d2 commit 59093e5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ The types of changes are:
- Fix type errors when TCF vendors have no dataDeclaration [#4465](https://github.com/ethyca/fides/pull/4465)
- Fixed an error where editing an AC system would mistakenly lock it for GVL [#4471](https://github.com/ethyca/fides/pull/4471)
- Refactor custom Get Preferences function to occur after our CMP API initialization [#4466](https://github.com/ethyca/fides/pull/4466)
- Fix an error where a connector response value of None causes a DSR failure due to a missing value [#4483](https://github.com/ethyca/fides/pull/4483)
- Fixed system name being non-editable when locked for GVL [#4475](https://github.com/ethyca/fides/pull/4475)
- Fixed a bug with "null" values for retention period field on data uses [#4487](https://github.com/ethyca/fides/pull/4487)

Expand Down
2 changes: 1 addition & 1 deletion src/fides/api/task/consolidate_query_matches.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def consolidate_query_matches(
value, FieldPath(*target_path.levels[1:]), flattened_matches
)

else:
elif row:
flattened_matches.append(row)

return flattened_matches
5 changes: 5 additions & 0 deletions tests/ops/task/test_consolidate_query_matches.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,8 @@ def test_consolidate_query_matches():
field_path = FieldPath()
input_data = {"A": [{"B": 1, "C": 2}, {"B": 3, "C": 4}, {"B": 5, "C": 6}]}
assert consolidate_query_matches(input_data, field_path) == []

# input data key exists, None value
input_data = {"A": None}
field_path = FieldPath("A")
assert consolidate_query_matches(input_data, field_path) == []

0 comments on commit 59093e5

Please sign in to comment.