Skip to content

Commit 5948d62

Browse files
committed
We should remove reg tokens also when InvalidRegistration coming from
GCM
1 parent e1a7abb commit 5948d62

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Error handling
8181
if 'errors' in response:
8282
for error, reg_ids in response['errors'].items():
8383
# Check for errors and act accordingly
84-
if error is 'NotRegistered':
84+
if error in ['NotRegistered', 'InvalidRegistration']:
8585
# Remove reg_ids from database
8686
for reg_id in reg_ids:
8787
entity.filter(registration_id=reg_id).delete()

0 commit comments

Comments
 (0)