Skip to content

Commit b538a55

Browse files
committed
Do not mysteriously fall back to json in gcm_send_message
Introduced in d4bf8b9, it's a very bad idea.
1 parent e79e1af commit b538a55

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

push_notifications/gcm.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,7 @@ def gcm_send_message(registration_id, data, **kwargs):
113113
https://developers.google.com/cloud-messaging/server-ref#downstream
114114
"""
115115

116-
try:
117-
_gcm_send_plain(registration_id, data, **kwargs)
118-
except AttributeError:
119-
_gcm_send_json([registration_id], data, *kwargs)
116+
return _gcm_send_plain(registration_id, data, **kwargs)
120117

121118

122119
def gcm_send_bulk_message(registration_ids, data, **kwargs):

0 commit comments

Comments
 (0)