mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
python: Elide unnecessary list wrappers.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
eff0a73925
commit
2665a3ce2b
@@ -182,10 +182,8 @@ def bulk_get_cross_realm_bots() -> Dict[str, UserProfile]:
|
||||
where_clause = (
|
||||
"upper(zerver_userprofile.email::text) IN (SELECT upper(email) FROM unnest(%s) AS email)"
|
||||
)
|
||||
users = list(
|
||||
UserProfile.objects.filter(realm__string_id=settings.SYSTEM_BOT_REALM).extra(
|
||||
where=[where_clause], params=(emails,)
|
||||
)
|
||||
users = UserProfile.objects.filter(realm__string_id=settings.SYSTEM_BOT_REALM).extra(
|
||||
where=[where_clause], params=(emails,)
|
||||
)
|
||||
|
||||
return {user.email.lower(): user for user in users}
|
||||
|
||||
Reference in New Issue
Block a user