fix: payment extra and payment hash
This commit is contained in:
+1
-1
@@ -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},
|
||||
)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user