summary refs log tree commit diff
path: root/synapse/storage/transactions.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-03-24 16:20:05 +0000
committerErik Johnston <erik@matrix.org>2015-03-24 16:20:05 +0000
commit1aa44939fc94ba1062d53a74dbd9629c32a2ae20 (patch)
tree7173da16c5660fd18cc403261de6b8c9d2ca643f /synapse/storage/transactions.py
parentDon't use room hosts table (diff)
downloadsynapse-1aa44939fc94ba1062d53a74dbd9629c32a2ae20.tar.xz
Fix bugs in transactions storage
Diffstat (limited to 'synapse/storage/transactions.py')
-rw-r--r--synapse/storage/transactions.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/storage/transactions.py b/synapse/storage/transactions.py
index c6e00ae3fe..03e1e3b808 100644
--- a/synapse/storage/transactions.py
+++ b/synapse/storage/transactions.py
@@ -143,7 +143,8 @@ class TransactionStore(SQLBaseStore):
             txn,
             table=SentTransactions.table_name,
             values={
-                "transaction_id": self.get_next_stream_id(),
+                "id": self.get_next_stream_id(),
+                "transaction_id": transaction_id,
                 "destination": destination,
                 "ts": origin_server_ts,
                 "response_code": 0,
@@ -240,7 +241,7 @@ class TransactionStore(SQLBaseStore):
             allow_none=True,
         )
 
-        if result["retry_last_ts"] > 0:
+        if result and result["retry_last_ts"] > 0:
             return result
         else:
             return None