From c915567517ba952bd640d712cd19fdeee32c7433 Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Fri, 7 Dec 2018 22:42:28 -0500 Subject: don't try to modify a non-existant result --- synapse/storage/end_to_end_keys.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/synapse/storage/end_to_end_keys.py b/synapse/storage/end_to_end_keys.py index edfacf36db..6b732cf670 100644 --- a/synapse/storage/end_to_end_keys.py +++ b/synapse/storage/end_to_end_keys.py @@ -153,7 +153,8 @@ class EndToEndKeyStore(SQLBaseStore): user_id = attestation["user_id"] device_id = attestation["device_id"] # FIXME: combine signatures of the same payload? - if user_id in result and device_id in result[user_id]: + if user_id in result and device_id in result[user_id] \ + and result[user_id][device_id]: result[user_id][device_id].setdefault("attestations", []) \ .append(attestation) -- cgit 1.4.1