add a key existence check to tags_by_room to avoid /events 500'ing when testing against vector

pull/352/head
Matthew Hodgson 2015-11-06 20:49:57 +01:00
parent 5335bf9c34
commit 767c20a869
1 changed files with 2 additions and 1 deletions

View File

@ -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)