Skip to content

fix: nil-check start_time element in _set_recheck (#1174)#1220

Merged
HenriWahl merged 1 commit into
HenriWahl:zabbix_fixfrom
SAY-5:fix/zabbix7-set-recheck-attrs-1174
May 3, 2026
Merged

fix: nil-check start_time element in _set_recheck (#1174)#1220
HenriWahl merged 1 commit into
HenriWahl:zabbix_fixfrom
SAY-5:fix/zabbix7-set-recheck-attrs-1174

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 3, 2026

Fixes #1174.

When a Zabbix 7 (or any Nagios-class) user lacks permission to schedule rechecks, result.result.find(attrs={'name': 'start_time'}) returns None and .attrs raises AttributeError. Now the result is nil-checked and a clear Result error is returned instead of crashing.

Return a clear Result error when the start_time element is missing (insufficient role permissions) instead of crashing with AttributeError on NoneType.attrs.

Signed-off-by: SAY-5 <say.apm35@gmail.com>
@HenriWahl HenriWahl changed the base branch from master to zabbix_fix May 3, 2026 12:14
@HenriWahl HenriWahl merged commit 949a54b into HenriWahl:zabbix_fix May 3, 2026
2 checks passed
HenriWahl pushed a commit that referenced this pull request May 8, 2026
Return a clear Result error when the start_time element is missing (insufficient role permissions) instead of crashing with AttributeError on NoneType.attrs.

Signed-off-by: SAY-5 <say.apm35@gmail.com>
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.

Nagstamon 3.17-20260209: Zabbix7 user role issue

2 participants