Fixing bug in automatic casting of PayloadAlert to dict
This commit is contained in:
+1
-1
@@ -56,7 +56,7 @@ class Payload(object):
|
|||||||
'aps': {}
|
'aps': {}
|
||||||
}
|
}
|
||||||
if self.alert:
|
if self.alert:
|
||||||
if self.alert is PayloadAlert:
|
if isinstance(self.alert, PayloadAlert):
|
||||||
result['aps']['alert'] = self.alert.dict()
|
result['aps']['alert'] = self.alert.dict()
|
||||||
else:
|
else:
|
||||||
result['aps']['alert'] = self.alert
|
result['aps']['alert'] = self.alert
|
||||||
|
|||||||
Reference in New Issue
Block a user