Skip to content

Commit

Permalink
Fix error when send a message and the device is not active
Browse files Browse the repository at this point in the history
  • Loading branch information
goinnn authored and jleclanche committed Dec 21, 2018
1 parent 600495b commit e335ac6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions push_notifications/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ def send_messages(self, request, queryset, bulk=False):
except TypeError:
for entry in ret[0][0]:
errors = errors + [r["error"] for r in entry["results"] if "error" in r]
except IndexError:
pass
if errors:
self.message_user(
request, _("Some messages could not be processed: %r" % (", ".join(errors))),
Expand Down

0 comments on commit e335ac6

Please sign in to comment.