[o365] Remove redundant filtering logic for non-cursor state#19320
Conversation
✅ Elastic Docs Style Checker (Vale)No issues found on modified lines! The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
e9050dd to
906ea54
Compare
🚀 Benchmarks reportTo see the full report comment with |
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
| (existing_todo_types.size() > 0) ? | ||
| existing_todo_types | ||
| : | ||
| state.base.content_types.split(",").map(t, t.trim_space()) |
There was a problem hiding this comment.
Do we want to make this more robust to user input like type1, , type2 (extra commas, with spaces). The previous code does this incidentally.
There was a problem hiding this comment.
Yes, that's good. Added.
906ea54 to
d5382aa
Compare
| (existing_todo_types.size() > 0) ? | ||
| existing_todo_types | ||
| : | ||
| state.base.content_types.split(",").map(t, t.trim_space()).filter(t, size(t) > 0) |
There was a problem hiding this comment.
| state.base.content_types.split(",").map(t, t.trim_space()).filter(t, size(t) > 0) | |
| state.base.content_types.split(",").map(t, t.trim_space() != "", t.trim_space()) |
rather than making two arrays, and using "" instead of size so that it's clear we're dealing with strings.
Also, will need to regenerate the policy tests.
d5382aa to
d99ad76
Compare
💚 Build Succeeded
History
|
|
Package o365 - 3.10.1 containing this change is available at https://epr.elastic.co/package/o365/3.10.1/ |
Proposed commit message
Checklist
changelog.ymlfile.Related issues