summary refs log tree commit diff
path: root/synapse/storage/e2e_room_keys.py
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2017-12-27 23:58:51 +0000
committerHubert Chathi <hubert@uhoreg.ca>2018-08-12 19:14:31 -0400
commit982edca38026e2bb9085e77b4c25af60c4793f34 (patch)
tree541714dac16ad433825978ed9c1057d940f70578 /synapse/storage/e2e_room_keys.py
parentfix typos (diff)
downloadsynapse-982edca38026e2bb9085e77b4c25af60c4793f34.tar.xz
fix flakes
Diffstat (limited to 'synapse/storage/e2e_room_keys.py')
-rw-r--r--synapse/storage/e2e_room_keys.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/storage/e2e_room_keys.py b/synapse/storage/e2e_room_keys.py
index b51faa1204..7ab75070a2 100644
--- a/synapse/storage/e2e_room_keys.py
+++ b/synapse/storage/e2e_room_keys.py
@@ -202,13 +202,15 @@ class EndToEndRoomKeyStore(SQLBaseStore):
                     "SELECT MAX(version) FROM e2e_room_keys_versions WHERE user_id=?",
                     (user_id,)
                 )
-                version = txn.fetchone()[0]
+                this_version = txn.fetchone()[0]
+            else:
+                this_version = version
 
             return self._simple_select_one_txn(
                 table="e2e_room_keys_versions",
                 keyvalues={
                     "user_id": user_id,
-                    "version": version,
+                    "version": this_version,
                 },
                 retcols=(
                     "user_id",