Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

invites: The aggregate is null if there are no rows to sum.

Alex Vandivera06a699c3578
diff --git a/zerver/actions/invites.py b/zerver/actions/invites.py
index 2c97f3dc786..d68c04b9bba 100644
--- a/zerver/actions/invites.py
+++ b/zerver/actions/invites.py
@@ -118,7 +118,7 @@ def apply_invite_realm_heuristics(realm: Realm, recent_invites: int, num_invitee
estimated_sent = RealmCount.objects.filter(
realm=realm, property="messages_sent:message_type:day"
).aggregate(messages=Sum("value"))
- if estimated_sent["messages"] == 0:
+ if not estimated_sent["messages"]:
suspicion_score += 1
if suspicion_score == 6: