From a8ee0ecc6992f9bd8a1d4ecd35f7dd9a2f124e4b Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 19 Oct 2012 17:55:49 -0400 Subject: [PATCH] Fix bug allowing subscribing to a stream twice. (imported from commit c49b7c8ec49fd71bb1e1f1226d9e126d4d0987df) --- zephyr/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zephyr/views.py b/zephyr/views.py index 5f66d2b55d..1ad9cc4b6e 100644 --- a/zephyr/views.py +++ b/zephyr/views.py @@ -584,7 +584,7 @@ def json_add_subscription(request): def add_subscriptions_backend(request, user_profile, streams): subscribed = [] already_subscribed = [] - for stream_name in streams: + for stream_name in list(set(streams)): stream = create_stream_if_needed(user_profile.realm, stream_name) recipient = Recipient.objects.get(type_id=stream.id, type=Recipient.STREAM)