diff options
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r-- | synapse/storage/_base.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index d64119a473..444e7628d1 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -403,9 +403,10 @@ class SQLBaseStore(object): return events def _has_been_deleted_txn(self, txn, event): - sql = "SELECT * FROM deletions WHERE deletes = ?" + sql = "SELECT event_id FROM deletions WHERE deletes = ?" txn.execute(sql, (event.event_id,)) - return len(txn.fetchall()) > 0 + result = txn.fetchone() + return result[0] if result else None class Table(object): |