diff options
author | Erik Johnston <erik@matrix.org> | 2016-01-28 15:55:26 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-01-28 15:55:26 +0000 |
commit | c23a8c783382a0789c757e16e104cf08654e6cf8 (patch) | |
tree | a00b36f2352eb555ae6e8e0e474d9a41ea27cadc /synapse/storage/stream.py | |
parent | Invalidate caches properly. Remove unused arg (diff) | |
download | synapse-c23a8c783382a0789c757e16e104cf08654e6cf8.tar.xz |
Ensure keys to RoomStreamChangeCache are ints
Diffstat (limited to 'synapse/storage/stream.py')
-rw-r--r-- | synapse/storage/stream.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py index 67e7e6a76f..6a724193e1 100644 --- a/synapse/storage/stream.py +++ b/synapse/storage/stream.py @@ -199,12 +199,13 @@ class StreamStore(SQLBaseStore): if from_key == to_key: defer.returnValue(([], from_key)) - has_changed = yield self._events_stream_cache.get_room_has_changed( - room_id, from_id - ) + if from_id: + has_changed = yield self._events_stream_cache.get_room_has_changed( + room_id, from_id + ) - if not has_changed: - defer.returnValue(([], from_key)) + if not has_changed: + defer.returnValue(([], from_key)) def f(txn): if from_id is not None: |