management commands: Fix incorrect use of user_profile.email.

All of these management commands should be interacting with
.delivery_email; this results in buggy behavior with
EMAIL_ADDRESS_VISIBILITY_ADMINS.
This commit is contained in:
Tim Abbott
2019-11-15 16:42:36 -08:00
parent 0632d26e5e
commit e124837cdc
9 changed files with 14 additions and 13 deletions

View File

@@ -24,7 +24,7 @@ def sync_ldap_user_data(user_profiles: List[UserProfile]) -> None:
try:
sync_user_from_ldap(u, logger)
except ZulipLDAPException as e:
logger.error("Error attempting to update user %s:" % (u.email,))
logger.error("Error attempting to update user %s:" % (u.delivery_email,))
logger.error(e)
logger.info("Finished update.")