-
Notifications
You must be signed in to change notification settings - Fork 515
ti_opencti: fix pipeline errors due to access method from a null reference #16129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ti_opencti: fix pipeline errors due to access method from a null reference #16129
Conversation
🚀 Benchmarks reportTo see the full report comment with |
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
| if (ctx.threat == null) { | ||
| ctx.threat = [:]; | ||
| } | ||
| if (ctx.threat.indicator == null) { | ||
| ctx.threat.indicator = [:]; | ||
| } | ||
| if (ctx.threat.indicator.file == null) { | ||
| ctx.threat.indicator.file = []; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be less verbose:
| if (ctx.threat == null) { | |
| ctx.threat = [:]; | |
| } | |
| if (ctx.threat.indicator == null) { | |
| ctx.threat.indicator = [:]; | |
| } | |
| if (ctx.threat.indicator.file == null) { | |
| ctx.threat.indicator.file = []; | |
| } | |
| ctx.threat = ctx.threat ?: [:]; | |
| ctx.threat.indicator = ctx.threat.indicator ?: [:]; | |
| ctx.threat.indicator.file = ctx.threat.indicator.file ?: []; |
Also below.
💚 Build Succeeded
History
|
|
Package ti_opencti - 2.10.1 containing this change is available at https://epr.elastic.co/package/ti_opencti/2.10.1/ |
Proposed commit message
Checklist
changelog.ymlfile.Related issues
Screenshots