Merge pull request #13 from deceze/master

Fixing bug in automatic casting of PayloadAlert to dict
This commit is contained in:
Sergey Petrov
2016-08-13 23:24:49 +04:00
committed by GitHub
+1 -1
View File
@@ -56,7 +56,7 @@ class Payload(object):
'aps': {}
}
if self.alert:
if self.alert is PayloadAlert:
if isinstance(self.alert, PayloadAlert):
result['aps']['alert'] = self.alert.dict()
else:
result['aps']['alert'] = self.alert