soft_deactivation: Remove select_related call.

This commit removes select_related call from
get_soft_deactivated_users_for_catch_up as
we do not use any related fields for the
UserProfile objects fetched using this call.
This commit is contained in:
Sahil Batra
2023-07-12 15:07:08 +05:30
committed by Tim Abbott
parent 290973585c
commit eda3879733

View File

@@ -382,7 +382,7 @@ def do_catch_up_soft_deactivated_users(users: Iterable[UserProfile]) -> List[Use
def get_soft_deactivated_users_for_catch_up(filter_kwargs: Any) -> QuerySet[UserProfile]:
users_to_catch_up = UserProfile.objects.select_related().filter(
users_to_catch_up = UserProfile.objects.filter(
long_term_idle=True,
is_active=True,
is_bot=False,