mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
The set of objects in the `users` object can be very large (in some cases, literally every object in the database) and making them into a giant `id in (...)` to handle the one tiny corner case which we never use is silly. Switch the `--users` codepath to returning a QuerySet as well, so it can be composed. We pass a QuerySet into send_custom_email as well, so it can ensure that the realm is `select_related` in as well, no matter how the QuerySet was generated.