mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
zerver/views: remove import six.
This commit is contained in:
@@ -54,7 +54,6 @@ import ujson
|
|||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from six.moves import map
|
from six.moves import map
|
||||||
import six
|
|
||||||
|
|
||||||
LARGER_THAN_MAX_MESSAGE_ID = 10000000000000000
|
LARGER_THAN_MAX_MESSAGE_ID = 10000000000000000
|
||||||
|
|
||||||
|
|||||||
@@ -32,8 +32,6 @@ from collections import defaultdict
|
|||||||
import ujson
|
import ujson
|
||||||
from six.moves import urllib
|
from six.moves import urllib
|
||||||
|
|
||||||
import six
|
|
||||||
|
|
||||||
class PrincipalError(JsonableError):
|
class PrincipalError(JsonableError):
|
||||||
code = ErrorCode.UNAUTHORIZED_PRINCIPAL
|
code = ErrorCode.UNAUTHORIZED_PRINCIPAL
|
||||||
data_fields = ['principal']
|
data_fields = ['principal']
|
||||||
@@ -282,7 +280,7 @@ def add_subscriptions_backend(request, user_profile,
|
|||||||
# or if a new stream was created with the "announce" option.
|
# or if a new stream was created with the "announce" option.
|
||||||
notifications = []
|
notifications = []
|
||||||
if len(principals) > 0 and result["subscribed"]:
|
if len(principals) > 0 and result["subscribed"]:
|
||||||
for email, subscribed_stream_names in six.iteritems(result["subscribed"]):
|
for email, subscribed_stream_names in result["subscribed"].items():
|
||||||
if email == user_profile.email:
|
if email == user_profile.email:
|
||||||
# Don't send a Zulip if you invited yourself.
|
# Don't send a Zulip if you invited yourself.
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user