get_user_by_id: Use delivery_email when finding cross-realm bots.

When actually looking for bots, it doesn't matter, but this feels more
consistent with the other lookup code.
This commit is contained in:
Tim Abbott 2019-11-15 17:17:05 -08:00
parent b85c9b0810
commit caf4c7af8f
1 changed files with 1 additions and 1 deletions

View File

@ -2154,7 +2154,7 @@ def get_user_by_id_in_realm_including_cross_realm(
# Note: This doesn't validate whether the `realm` passed in is
# None/invalid for the CROSS_REALM_BOT_EMAILS case.
if user_profile.email in settings.CROSS_REALM_BOT_EMAILS:
if user_profile.delivery_email in settings.CROSS_REALM_BOT_EMAILS:
return user_profile
raise UserProfile.DoesNotExist()