summary refs log tree commit diff
path: root/synapse/storage/events.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-07-06 15:56:59 +0100
committerErik Johnston <erik@matrix.org>2016-07-06 15:56:59 +0100
commit67f2c901ea4196d869380c1c5cdd8569934857ed (patch)
treee0a7c1778a0fa12864e5eff53095f01b6b639931 /synapse/storage/events.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into erikj/test2 (diff)
downloadsynapse-67f2c901ea4196d869380c1c5cdd8569934857ed.tar.xz
Add rest servlet. Fix SQL.
Diffstat (limited to '')
-rw-r--r--synapse/storage/events.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index c3b498bb3d..23ebd5d4c5 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -1384,10 +1384,6 @@ class EventsStore(SQLBaseStore):
             (event_id,) for event_id, state_key in event_rows
             if state_key is None and not self.hs.is_mine_id(event_id)
         ]
-        to_not_delete = [
-            (event_id,) for event_id, state_key in event_rows
-            if state_key is not None or self.hs.is_mine_id(event_id)
-        ]
         for table in (
             "events",
             "event_json",
@@ -1424,7 +1420,10 @@ class EventsStore(SQLBaseStore):
         txn.executemany(
             "UPDATE events SET outlier = ?"
             " WHERE event_id = ?",
-            to_not_delete
+            [
+                (True, event_id,) for event_id, state_key in event_rows
+                if state_key is not None or self.hs.is_mine_id(event_id)
+            ]
         )