Fix empty data attribute in sinch service call (#28253)

* Fix empty data attribute in sinch service call

* Simplified the PR as per @MartinHjelmare`s request.
This commit is contained in:
Bendik Brenne 2019-11-26 14:14:09 +01:00 committed by Martin Hjelmare
parent c76f768a82
commit c538d899a2

View file

@ -61,7 +61,7 @@ class SinchNotificationService(BaseNotificationService):
def send_message(self, message="", **kwargs):
"""Send a message to a user."""
targets = kwargs.get(ATTR_TARGET, self.default_recipients)
data = kwargs.get(ATTR_DATA, {})
data = kwargs.get(ATTR_DATA) or {}
clx_args = {ATTR_MESSAGE: message, ATTR_SENDER: self.sender}