summary refs log tree commit diff
path: root/synapse/storage/e2e_room_keys.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2018-10-30 11:12:23 +0000
committerDavid Baker <dave@matrix.org>2018-10-30 11:12:23 +0000
commite0934acdbbd497ee1330efe42feccb11382639ec (patch)
treea33e5c436a8627e2efd864bfba86243face78b44 /synapse/storage/e2e_room_keys.py
parentCast bacjup version to int when querying (diff)
downloadsynapse-e0934acdbbd497ee1330efe42feccb11382639ec.tar.xz
Cast to int here too
Diffstat (limited to 'synapse/storage/e2e_room_keys.py')
-rw-r--r--synapse/storage/e2e_room_keys.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/storage/e2e_room_keys.py b/synapse/storage/e2e_room_keys.py
index 2a012e9487..a1d203fd61 100644
--- a/synapse/storage/e2e_room_keys.py
+++ b/synapse/storage/e2e_room_keys.py
@@ -118,6 +118,11 @@ class EndToEndRoomKeyStore(SQLBaseStore):
             these room keys.
         """
 
+        try:
+            version = int(version)
+        except ValueError:
+            defer.returnValue({'rooms': {}})
+
         keyvalues = {
             "user_id": user_id,
             "version": version,