summary refs log tree commit diff
path: root/synapse/storage/events.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-03-08 15:05:32 +0000
committerErik Johnston <erik@matrix.org>2019-03-08 15:05:32 +0000
commit5536ddba754fcdd65f8286c75829bf7860a393a5 (patch)
tree0211e5f44e4533bc435ba3326a5e51cd7dd71ed3 /synapse/storage/events.py
parentMerge pull request #4814 from matrix-org/erikj/soft_fail_impl (diff)
downloadsynapse-5536ddba754fcdd65f8286c75829bf7860a393a5.tar.xz
Make `prev_state` field optional
The `prev_state` field on events is not specced and so synapse shouldn't
explode if an event is missing the field.

Fixes #4787
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r--synapse/storage/events.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index 990a5eaaae..428300ea0a 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -1407,21 +1407,6 @@ class EventsStore(StateGroupWorkerStore, EventFederationStore, EventsWorkerStore
             values=state_values,
         )
 
-        self._simple_insert_many_txn(
-            txn,
-            table="event_edges",
-            values=[
-                {
-                    "event_id": event.event_id,
-                    "prev_event_id": prev_id,
-                    "room_id": event.room_id,
-                    "is_state": True,
-                }
-                for event, _ in state_events_and_contexts
-                for prev_id, _ in event.prev_state
-            ],
-        )
-
         # Prefill the event cache
         self._add_to_cache(txn, events_and_contexts)