Fix slack targets (#3826)

This commit is contained in:
Fabian Affolter authored and Paulus Schoutsen committed 2016-10-11 21:58:54 -07:00
1 parent 0b327cd4d9
commit 73547c8c4b
1 file changed
+4 -1
+4 -1
View File
@@ -68,7 +68,10 @@ class SlackNotificationService(BaseNotificationService):
"""Send a message to a user."""
import slacker
targets = kwargs.get(ATTR_TARGET, [self._default_channel])
if kwargs.get(ATTR_TARGET) is None:
targets = [self._default_channel]
else:
targets = kwargs.get(ATTR_TARGET)
data = kwargs.get('data')
attachments = data.get('attachments') if data else None