Fixed tpos links not being fetched

This commit is contained in:
benarc
2020-12-01 22:53:52 +00:00
parent ae59c74c24
commit 31b1c0d1d5

View File

@@ -13,9 +13,8 @@ from .crud import create_tpos, get_tpos, get_tposs, delete_tpos
@api_check_wallet_key("invoice")
async def api_tposs():
wallet_ids = [g.wallet.id]
if "all_wallets" in request.args:
wallet_ids = await get_user(g.wallet.user).wallet_ids
wallet_ids = (await get_user(g.wallet.user)).wallet_ids
return jsonify([tpos._asdict() for tpos in await get_tposs(wallet_ids)]), HTTPStatus.OK