summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2015-11-06 20:49:57 +0100
committerMatthew Hodgson <matthew@matrix.org>2015-11-06 20:49:57 +0100
commit767c20a869933204b6e545c6f1495cd7cd298a87 (patch)
treed89774054676bc9a1e6cc433ceb74fa5a8854db6
parentMerge pull request #353 from matrix-org/daniel/oops (diff)
downloadsynapse-767c20a869933204b6e545c6f1495cd7cd298a87.tar.xz
add a key existence check to tags_by_room to avoid /events 500'ing when testing against vector
-rw-r--r--synapse/storage/tags.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/tags.py b/synapse/storage/tags.py
index 641ea250f0..73babd53d9 100644
--- a/synapse/storage/tags.py
+++ b/synapse/storage/tags.py
@@ -95,7 +95,8 @@ class TagsStore(SQLBaseStore):
         if room_ids:
             tags_by_room = yield self.get_tags_for_user(user_id)
             for room_id in room_ids:
-                results[room_id] = tags_by_room[room_id]
+                if room_id in tags_by_room:
+                    results[room_id] = tags_by_room[room_id]
 
         defer.returnValue(results)