summary refs log tree commit diff
path: root/synapse/storage/transactions.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-05-05 18:15:20 +0100
committerErik Johnston <erik@matrix.org>2015-05-05 18:15:20 +0100
commited2584050f4dc1e09f7e29735bbf89686e0fe04d (patch)
tree0f71510eb24eb9168b48a7b5e0a5ae946a06685d /synapse/storage/transactions.py
parentAdd a comment about the zip(*[zip(sorted(...),...)]) (diff)
parentUse buffer(...) when inserting into bytea column (diff)
downloadsynapse-ed2584050f4dc1e09f7e29735bbf89686e0fe04d.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/executemany
Diffstat (limited to 'synapse/storage/transactions.py')
-rw-r--r--synapse/storage/transactions.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/transactions.py b/synapse/storage/transactions.py
index 89dd7d8947..b5b21a9b13 100644
--- a/synapse/storage/transactions.py
+++ b/synapse/storage/transactions.py
@@ -17,6 +17,7 @@ from ._base import SQLBaseStore, cached
 
 from collections import namedtuple
 
+from syutil.jsonutil import encode_canonical_json
 import logging
 
 logger = logging.getLogger(__name__)
@@ -82,7 +83,7 @@ class TransactionStore(SQLBaseStore):
                 "transaction_id": transaction_id,
                 "origin": origin,
                 "response_code": code,
-                "response_json": response_dict,
+                "response_json": buffer(encode_canonical_json(response_dict)),
             },
             or_ignore=True,
             desc="set_received_txn_response",