diff options
author | Erik Johnston <erik@matrix.org> | 2014-09-24 13:29:20 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-09-24 13:29:20 +0100 |
commit | 1e6c5b205c95c1f6941688c13a15314100a8470d (patch) | |
tree | d7a69c914a85be8474daf241d78438237f7cfb32 /synapse/storage/_base.py | |
parent | Fill out the prune_event method. (diff) | |
download | synapse-1e6c5b205c95c1f6941688c13a15314100a8470d.tar.xz |
Fix bug where we didn't correctly pull out the event_id of the deletion
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): |