summary refs log tree commit diff
diff options
context:
space:
mode:
authorJason Robinson <jasonr@matrix.org>2019-09-09 16:43:32 +0300
committerJason Robinson <jasonr@matrix.org>2019-09-09 16:43:32 +0300
commite89fea4f04c6fc7df41c5cade63609b513a98073 (patch)
tree64e37c39e5279fe8a6f54d84587c4435bc047cf9
parentSimplify is_real_user_txn check to trust user_type is null if real user (diff)
downloadsynapse-e89fea4f04c6fc7df41c5cade63609b513a98073.tar.xz
Simplify count_real_users SQL to only count user_type is null rows
Signed-off-by: Jason Robinson <jasonr@matrix.org>
-rw-r--r--synapse/storage/registration.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/registration.py b/synapse/storage/registration.py
index 54b0846c54..c0ca25733b 100644
--- a/synapse/storage/registration.py
+++ b/synapse/storage/registration.py
@@ -450,7 +450,7 @@ class RegistrationWorkerStore(SQLBaseStore):
 
         def _count_users(txn):
             txn.execute(
-                "SELECT COUNT(*) AS users FROM users where user_type is null or user_type = ''"
+                "SELECT COUNT(*) AS users FROM users where user_type is null"
             )
             rows = self.cursor_to_dict(txn)
             if rows: