queue_processors: Fix bug in handling removed push notifications.

Apparently, we were falling through to the "add" case after correctly
processing the "remove" case, throwing a 500.
This commit is contained in:
Tim Abbott 2018-09-12 11:46:27 -07:00
parent 7acd640f6a
commit 165078b484
1 changed files with 2 additions and 1 deletions

View File

@ -308,7 +308,8 @@ class PushNotificationsWorker(QueueProcessingWorker): # nocoverage
def consume(self, data: Mapping[str, Any]) -> None:
if data.get("type", "add") == "remove":
handle_remove_push_notification(data['user_profile_id'], data['message_id'])
handle_push_notification(data['user_profile_id'], data)
else:
handle_push_notification(data['user_profile_id'], data)
# We probably could stop running this queue worker at all if ENABLE_FEEDBACK is False
@assign_queue('feedback_messages')