find_account: Do not place Realm objects into context.

This commit is contained in:
Alex Vandiver 2025-05-05 19:27:21 +00:00 committed by Tim Abbott
parent 1e1292f2f5
commit 0078310be7
2 changed files with 2 additions and 2 deletions

View File

@ -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 %}

View File

@ -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.