Commit 42bbc349 authored by Tao Wang's avatar Tao Wang Committed by 王涛

fix bugs: lack of brackets

parent da56ec3f
...@@ -47,7 +47,7 @@ def ios(alert=None, badge=None, sound=None, content_available=False, ...@@ -47,7 +47,7 @@ def ios(alert=None, badge=None, sound=None, content_available=False,
""" """
payload = {} payload = {}
if alert is not None: if alert is not None:
if not isinstance(alert, str) or isinstance(alert, dict): if not isinstance(alert, (str, dict)):
raise ValueError("iOS alert must be a string or dictionary") raise ValueError("iOS alert must be a string or dictionary")
payload['alert'] = alert payload['alert'] = alert
if badge is not None: if badge is not None:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment