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

fix 'NoneType is not subscriptable' error in Icinga2API #950

Merged
merged 1 commit into from Jul 16, 2023
Merged

fix 'NoneType is not subscriptable' error in Icinga2API #950

merged 1 commit into from Jul 16, 2023

Conversation

ghost
Copy link

@ghost ghost commented Jul 13, 2023

When connecting to a certain Icinga instance, it seems that some checks do not have a value for last_check_result. This causes the following error in Nagstamon, with no results displayed:

TypeError: 'NoneType' object is not subscriptable

Enabling debug mode revealed that the error was thrown from the line modified in this commit.

This commit wraps the assignment with a check for None to avoid this error.

fixes #949

When connecting to a certain Icinga instance, it seems that some checks
do not have a value for last_check_result. This causes the following
error in Nagstamon, with no results displayed:

TypeError: 'NoneType' object is not subscriptable

Enabling debug mode revealed that the error was thrown from the line
modified in this commit.

This commit wraps the assignment with a check for None to avoid this
error.

fixes #949
@HenriWahl HenriWahl merged commit 0fbffd5 into HenriWahl:master Jul 16, 2023
@HenriWahl
Copy link
Owner

Thanks!

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.

Error "NoneType object is not subscriptable" using Icinga2Api
1 participant