Skip to content

Commit

Permalink
fix: None type cannot be used in a join() function (#357)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnseekins authored Oct 18, 2021
1 parent 72fff0a commit f23bf5f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugins/zabbix/alerta_zabbix.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def status_change(self, alert, status, text):
r = self.zapi.event.get(objectids=trigger_id, acknowledged=False, output='extend', sortfield='clock', sortorder='DESC', limit=10)
event_ids = [e['eventid'] for e in r]
except ZabbixAPIException:
event_ids = None
LOG.error(f"No eventids retrieved from Zabbix for {trigger_id}")
return

LOG.debug('Zabbix: status=ack; triggerId %s => eventIds %s', trigger_id, ','.join(event_ids))

Expand All @@ -87,7 +88,8 @@ def status_change(self, alert, status, text):
r = self.zapi.event.get(objectids=trigger_id, output='extend', sortfield='clock', sortorder='DESC', limit=10)
event_ids = [e['eventid'] for e in r]
except ZabbixAPIException:
event_ids = None
LOG.error(f"No eventids retrieved from Zabbix for {trigger_id}")
return

LOG.debug('Zabbix: status=closed; triggerId %s => eventIds %s', trigger_id, ','.join(event_ids))

Expand Down

0 comments on commit f23bf5f

Please sign in to comment.