summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--synapse/storage/database.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/synapse/storage/database.py b/synapse/storage/database.py
index b394a6658b..46be3b3876 100644
--- a/synapse/storage/database.py
+++ b/synapse/storage/database.py
@@ -2195,8 +2195,7 @@ class DatabasePool:
             clauses.append("%s = ?" % (key,))
             values.append(value)
 
-        if clauses:
-            sql = "%s WHERE %s" % (sql, " AND ".join(clauses))
+        sql = "%s WHERE %s" % (sql, " AND ".join(clauses))
         txn.execute(sql, values)
 
         return txn.rowcount