summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/end_to_end_keys.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/storage/end_to_end_keys.py b/synapse/storage/end_to_end_keys.py
index 8ce5dd8bf9..3c82f789fa 100644
--- a/synapse/storage/end_to_end_keys.py
+++ b/synapse/storage/end_to_end_keys.py
@@ -346,7 +346,8 @@ class EndToEndKeyStore(EndToEndKeyWorkerStore, SQLBaseStore):
         # The "keys" property must only have one entry, which will be the public
         # key, so we just grab the first value in there
         pubkey = next(iter(key["keys"].values()))
-        self._simple_insert(
+        self._simple_insert_txn(
+            txn,
             "devices",
             values={
                 "user_id": user_id,
@@ -354,12 +355,12 @@ class EndToEndKeyStore(EndToEndKeyWorkerStore, SQLBaseStore):
                 "display_name": key_type + " signing key",
                 "hidden": True,
             },
-            desc="store_master_key_device",
         )
 
         # and finally, store the key itself
         with self._cross_signing_id_gen.get_next() as stream_id:
-            self._simple_insert(
+            self._simple_insert_txn(
+                txn,
                 "e2e_cross_signing_keys",
                 values={
                     "user_id": user_id,
@@ -367,7 +368,6 @@ class EndToEndKeyStore(EndToEndKeyWorkerStore, SQLBaseStore):
                     "keydata": json.dumps(key),
                     "stream_id": stream_id,
                 },
-                desc="store_master_key",
             )
 
     def set_e2e_cross_signing_key(self, user_id, key_type, key):