Commit 4fb7f5d9 authored by fendouai's avatar fendouai Committed by GitHub

Merge pull request #35 from jhgdike/master

fix bugs: lack of brackets
parents 76a290fc 42bbc349
......@@ -47,7 +47,7 @@ def ios(alert=None, badge=None, sound=None, content_available=False,
"""
payload = {}
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")
payload['alert'] = alert
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