fix: payment extra and payment hash

This commit is contained in:
Vlad Stan
2024-10-10 09:08:56 +02:00
committed by dni ⚡
parent 3ccdc3e249
commit f227be2ea5
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -773,7 +773,7 @@ async def update_payment_extra(
row: dict = await (conn or db).fetchone(
f"""
SELECT payment_hash, extra from apipayments WHERE hash = :hash {amount_clause}
SELECT payment_hash, extra from apipayments WHERE payment_hash = :hash {amount_clause}
""",
{"hash": payment_hash},
)
+3
View File
@@ -650,6 +650,9 @@ def dict_to_model(_row: dict, model: type[TModel]) -> TModel:
if issubclass(type_, BaseModel) and value:
_dict[key] = dict_to_submodel(type_, value)
continue
if type_ is dict and value:
_dict[key] = json.loads(value)
continue
_dict[key] = value
continue
_model = model.construct(**_dict)