fix: account for withdraw link not found on two places.
This commit is contained in:
parent
3215b5d2bb
commit
61c8d70fe7
1 changed files with 6 additions and 0 deletions
|
|
@ -58,6 +58,9 @@ async def create_withdraw_link(
|
||||||
|
|
||||||
async def get_withdraw_link(link_id: str, num=0) -> Optional[WithdrawLink]:
|
async def get_withdraw_link(link_id: str, num=0) -> Optional[WithdrawLink]:
|
||||||
row = await db.fetchone("SELECT * FROM withdraw_link WHERE id = ?", (link_id,))
|
row = await db.fetchone("SELECT * FROM withdraw_link WHERE id = ?", (link_id,))
|
||||||
|
if not row:
|
||||||
|
return None
|
||||||
|
|
||||||
link = []
|
link = []
|
||||||
for item in row:
|
for item in row:
|
||||||
link.append(item)
|
link.append(item)
|
||||||
|
|
@ -69,6 +72,9 @@ async def get_withdraw_link_by_hash(unique_hash: str, num=0) -> Optional[Withdra
|
||||||
row = await db.fetchone(
|
row = await db.fetchone(
|
||||||
"SELECT * FROM withdraw_link WHERE unique_hash = ?", (unique_hash,)
|
"SELECT * FROM withdraw_link WHERE unique_hash = ?", (unique_hash,)
|
||||||
)
|
)
|
||||||
|
if not row:
|
||||||
|
return None
|
||||||
|
|
||||||
link = []
|
link = []
|
||||||
for item in row:
|
for item in row:
|
||||||
link.append(item)
|
link.append(item)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue