mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Use buffer(...) when inserting into bytea column
This commit is contained in:
parent
31049c4d72
commit
977338a7af
@ -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):
|
|||||||
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
|
|||||||
|
|
||||||
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):
|
|||||||
"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",
|
||||||
|
Loading…
Reference in New Issue
Block a user