mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-03-15 12:20:21 +01:00
fix missing number on model
This commit is contained in:
parent
68dd95dc59
commit
084ecb1c08
1 changed files with 9 additions and 2 deletions
|
@ -56,7 +56,10 @@ async def get_withdraw_link(link_id: str, num=0) -> Optional[WithdrawLink]:
|
|||
if not row:
|
||||
return None
|
||||
|
||||
return WithdrawLink(**row) if row else None
|
||||
link = dict(**row)
|
||||
link["number"] = num
|
||||
|
||||
return WithdrawLink.parse_obj(link)
|
||||
|
||||
|
||||
async def get_withdraw_link_by_hash(unique_hash: str, num=0) -> Optional[WithdrawLink]:
|
||||
|
@ -65,7 +68,11 @@ async def get_withdraw_link_by_hash(unique_hash: str, num=0) -> Optional[Withdra
|
|||
)
|
||||
if not row:
|
||||
return None
|
||||
return WithdrawLink(**row) if row else None
|
||||
|
||||
link = dict(**row)
|
||||
link["number"] = num
|
||||
|
||||
return WithdrawLink.parse_obj(link)
|
||||
|
||||
|
||||
async def get_withdraw_links(wallet_ids: Union[str, List[str]]) -> List[WithdrawLink]:
|
||||
|
|
Loading…
Add table
Reference in a new issue