summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-06-01 16:38:55 +0100
committerErik Johnston <erik@matrix.org>2015-06-01 16:39:43 +0100
commit6e174632289330aa494b15c3814743daebbf2127 (patch)
tree52b21d2faf04e559c0bd1d3d4bfd90df00f80740
parentMerge pull request #172 from intelfx/contrib-systemd (diff)
downloadsynapse-6e174632289330aa494b15c3814743daebbf2127.tar.xz
Don't explode if we don't have the event
-rw-r--r--synapse/storage/events.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index 20a8d81794..2caf0aae80 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -736,7 +736,8 @@ class EventsStore(SQLBaseStore):
 
             because = yield self.get_event(
                 redaction_id,
-                check_redacted=False
+                check_redacted=False,
+                allow_none=True,
             )
 
             if because:
@@ -746,6 +747,7 @@ class EventsStore(SQLBaseStore):
             prev = yield self.get_event(
                 ev.unsigned["replaces_state"],
                 get_prev_content=False,
+                allow_none=True,
             )
             if prev:
                 ev.unsigned["prev_content"] = prev.get_dict()["content"]