Skip to content

Commit

Permalink
fix(middlewared/alert): fix formatting for threaded alert services
Browse files Browse the repository at this point in the history
Ticket:	NAS-101728
  • Loading branch information
william-gr committed May 10, 2019
1 parent 371f2e2 commit ad45f96
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/middlewared/middlewared/alert/base.py
Expand Up @@ -252,7 +252,11 @@ def send_sync(self, alerts, gone_alerts, new_alerts):
def _format_alerts(self, alerts, gone_alerts, new_alerts):
product_name = self.middleware.call_sync("system.product_name")
hostname = self.middleware.call_sync("system.info")["hostname"]
return format_alerts(product_name, hostname, alerts, gone_alerts, new_alerts)
if not self.middleware.call_sync("system.is_freenas"):
node_map = self.middleware.call_sync("alert.node_map")
else:
node_map = None
return format_alerts(product_name, hostname, node_map, alerts, gone_alerts, new_alerts)


class ProThreadedAlertService(ThreadedAlertService):
Expand Down

0 comments on commit ad45f96

Please sign in to comment.