forked from MirrorHub/synapse
Use buffer(...) when inserting into bytea column
This commit is contained in:
parent
31049c4d72
commit
977338a7af
2 changed files with 3 additions and 4 deletions
|
@ -23,8 +23,6 @@ from twisted.internet import defer
|
|||
|
||||
from synapse.util.logutils import log_function
|
||||
|
||||
from syutil.jsonutil import encode_canonical_json
|
||||
|
||||
import logging
|
||||
|
||||
|
||||
|
@ -71,7 +69,7 @@ class TransactionActions(object):
|
|||
transaction.transaction_id,
|
||||
transaction.origin,
|
||||
code,
|
||||
encode_canonical_json(response)
|
||||
response,
|
||||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue