diff options
author | Erik Johnston <erik@matrix.org> | 2015-05-05 18:12:44 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-05-05 18:12:53 +0100 |
commit | 977338a7afa5e95dba1ce230ba253daf2b239fb5 (patch) | |
tree | e74002bfb6830d154331ec4f726949db99935c39 /synapse/storage | |
parent | Merge pull request #139 from matrix-org/bugs/SYN-369 (diff) | |
download | synapse-977338a7afa5e95dba1ce230ba253daf2b239fb5.tar.xz |
Use buffer(...) when inserting into bytea column
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/transactions.py | 3 |
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", |