mirror of
https://github.com/zulip/zulip.git
synced 2025-10-29 11:03:54 +00:00
invites: Fix regression w/email vs. delivery_email.
In 220c2a5ff3 I
introduced a query to find invites by delivery_email
but was still using email as the key.
For most realms `email` and `delivery_email` are
synonymous, so this temporary bug would not affect
them. For realms that restrict emails, the invite
would have probably failed for other reasons, but
the symptom would have been less clear.
This commit is contained in:
@@ -130,7 +130,7 @@ def get_existing_user_errors(
|
||||
errors = {} # type: Dict[str, Tuple[str, bool]]
|
||||
|
||||
users = get_users_by_delivery_email(emails, target_realm).only(
|
||||
'email',
|
||||
'delivery_email',
|
||||
'is_active',
|
||||
'is_mirror_dummy',
|
||||
)
|
||||
@@ -143,7 +143,7 @@ def get_existing_user_errors(
|
||||
users in the same realm to have the same effective
|
||||
delivery email.)
|
||||
'''
|
||||
user_dict = {user.email.lower(): user for user in users}
|
||||
user_dict = {user.delivery_email.lower(): user for user in users}
|
||||
|
||||
def process_email(email: str) -> None:
|
||||
if is_cross_realm_bot_email(email):
|
||||
|
||||
Reference in New Issue
Block a user