diff options
author | Andrew Morgan <andrewm@element.io> | 2022-08-04 14:15:33 +0100 |
---|---|---|
committer | Andrew Morgan <andrewm@element.io> | 2022-08-04 14:15:37 +0100 |
commit | 8346060c06b19c2a246506e0525e6bd393489884 (patch) | |
tree | e604ee2062b97d8a7e653eaad4a5f9235298cdc5 | |
parent | Revert "Allow deleting all rows when passing empty keyvalues dict to simple_d... (diff) | |
download | synapse-8346060c06b19c2a246506e0525e6bd393489884.tar.xz |
Remove unnecessary if condition
'clauses' will always be non-None.
-rw-r--r-- | synapse/storage/database.py | 3 |
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 |