Skip to content
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

Potential fix for #31 - define 'res' as empty list, when it's not being created due to empty SPL search results #32

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BartekZm
Copy link

Potential fix for #31 - define 'res' as empty list, when it's not being created due to empty SPL search results:
slack_alerts/bin:

(...)
def build_fields_attachment(payload):  
    res = payload.get('result', dict())                                        
    if not res:                                                                
       res = {}                                                  
    available_fields = list(res.keys()) 
(...)

It addresses the problem in my test environment in context of the issue #31 and I observed no impact on the behavior & additional for other sample alerts and how they're performed. Yet, please perform any additional tests when needed (I have no dev background & experience).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant