Skip to content
Snippets Groups Projects
Commit 977338a7 authored by Erik Johnston's avatar Erik Johnston
Browse files

Use buffer(...) when inserting into bytea column

parent 31049c4d
No related branches found
No related tags found
No related merge requests found
...@@ -23,8 +23,6 @@ from twisted.internet import defer ...@@ -23,8 +23,6 @@ from twisted.internet import defer
from synapse.util.logutils import log_function from synapse.util.logutils import log_function
from syutil.jsonutil import encode_canonical_json
import logging import logging
...@@ -71,7 +69,7 @@ class TransactionActions(object): ...@@ -71,7 +69,7 @@ class TransactionActions(object):
transaction.transaction_id, transaction.transaction_id,
transaction.origin, transaction.origin,
code, code,
encode_canonical_json(response) response,
) )
@defer.inlineCallbacks @defer.inlineCallbacks
......
...@@ -17,6 +17,7 @@ from ._base import SQLBaseStore, cached ...@@ -17,6 +17,7 @@ from ._base import SQLBaseStore, cached
from collections import namedtuple from collections import namedtuple
from syutil.jsonutil import encode_canonical_json
import logging import logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
...@@ -82,7 +83,7 @@ class TransactionStore(SQLBaseStore): ...@@ -82,7 +83,7 @@ class TransactionStore(SQLBaseStore):
"transaction_id": transaction_id, "transaction_id": transaction_id,
"origin": origin, "origin": origin,
"response_code": code, "response_code": code,
"response_json": response_dict, "response_json": buffer(encode_canonical_json(response_dict)),
}, },
or_ignore=True, or_ignore=True,
desc="set_received_txn_response", desc="set_received_txn_response",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment