mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-29 07:28:55 +03:00
Don't explode if we don't have the event
This commit is contained in:
parent
b579a8ea18
commit
6e17463228
1 changed files with 3 additions and 1 deletions
|
@ -736,7 +736,8 @@ class EventsStore(SQLBaseStore):
|
||||||
|
|
||||||
because = yield self.get_event(
|
because = yield self.get_event(
|
||||||
redaction_id,
|
redaction_id,
|
||||||
check_redacted=False
|
check_redacted=False,
|
||||||
|
allow_none=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
if because:
|
if because:
|
||||||
|
@ -746,6 +747,7 @@ class EventsStore(SQLBaseStore):
|
||||||
prev = yield self.get_event(
|
prev = yield self.get_event(
|
||||||
ev.unsigned["replaces_state"],
|
ev.unsigned["replaces_state"],
|
||||||
get_prev_content=False,
|
get_prev_content=False,
|
||||||
|
allow_none=True,
|
||||||
)
|
)
|
||||||
if prev:
|
if prev:
|
||||||
ev.unsigned["prev_content"] = prev.get_dict()["content"]
|
ev.unsigned["prev_content"] = prev.get_dict()["content"]
|
||||||
|
|
Loading…
Reference in a new issue