Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

rocketchat: Handle users with no email address set.

Alex Vandiver34394cec9a22
diff --git a/zerver/data_import/rocketchat.py b/zerver/data_import/rocketchat.py
index 5c4d32e1844..7c5b655b0f8 100644
--- a/zerver/data_import/rocketchat.py
+++ b/zerver/data_import/rocketchat.py
@@ -79,14 +79,14 @@ def process_users(
else:
is_mirror_dummy = True
- if not user_dict.get("emails"):
- user_dict["emails"] = [
- {
- "address": "{}-{}@{}".format(
- user_dict["username"], user_dict["type"], domain_name
- )
- }
- ]
+ if user_dict.get("emails") is None:
+ user_dict["emails"] = [
+ {
+ "address": "{}-{}@{}".format(
+ user_dict["username"], user_dict["type"], domain_name
+ )
+ }
+ ]
# TODO: Change this to use actual exported avatar
avatar_source = "G"