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.

find_account: Do not place Realm objects into context.

Alex Vandiver0078310be76e
diff --git a/templates/zerver/emails/find_team.txt b/templates/zerver/emails/find_team.txt
index 9f9a0fdb093..1fcdfd4313d 100644
--- a/templates/zerver/emails/find_team.txt
+++ b/templates/zerver/emails/find_team.txt
@@ -9,7 +9,7 @@
{% for realm in realms %}
-* {{ realm.name }}: {{ realm.url }}
+* {{ realm[0] }}: {{ realm[1] }}
{% endfor %}
{% trans %}If you have trouble logging in, you can reset your password.{% endtrans %}
diff --git a/zerver/views/registration.py b/zerver/views/registration.py
index 7e5e567a3a0..b22e40801e5 100644
--- a/zerver/views/registration.py
+++ b/zerver/views/registration.py
@@ -1546,7 +1546,7 @@ def find_account(request: HttpRequest) -> HttpResponse:
key = user.delivery_email.lower()
context.setdefault(key, {})
context[key].setdefault("realms", [])
- context[key]["realms"].append(user.realm)
+ context[key]["realms"].append([user.realm.name, user.realm.url])
# This value will end up being the last user ID among
# matching accounts; since it's only used for minor
# details like language, that arbitrary choice is OK.