Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
models: Replace user_profile__is_active queries with is_user_active.
Tim Abbott6346b9d3ebf6
diff --git a/zerver/lib/actions.py b/zerver/lib/actions.pyindex 9ce00b1938b..aa385565664 100644--- a/zerver/lib/actions.py+++ b/zerver/lib/actions.py@@ -6703,7 +6703,7 @@ def get_occupied_streams(realm: Realm) -> QuerySet:exists_expression = Exists(Subscription.objects.filter(active=True,- user_profile__is_active=True,+ is_user_active=True,user_profile__realm=realm,recipient_id=OuterRef("recipient_id"),),diff --git a/zerver/lib/stream_subscription.py b/zerver/lib/stream_subscription.pyindex 6ffe22b08e9..89eb0db1164 100644--- a/zerver/lib/stream_subscription.py+++ b/zerver/lib/stream_subscription.py@@ -46,6 +46,7 @@ def get_active_subscriptions_for_stream_ids(stream_ids: Set[int]) -> QuerySet:recipient__type=Recipient.STREAM,recipient__type_id__in=stream_ids,active=True,+ is_user_active=True,)@@ -117,9 +118,6 @@ def num_subscribers_for_stream_id(stream_id: int) -> int:def get_user_ids_for_streams(stream_ids: Set[int]) -> Dict[int, Set[int]]:all_subs = (get_active_subscriptions_for_stream_ids(stream_ids)- .filter(- user_profile__is_active=True,- ).values("recipient__type_id","user_profile_id",