forked from kodorvan/stcs
Fixed
This commit is contained in:
@@ -1268,7 +1268,7 @@ async def get_all_user_auto_trading(tg_id: int):
|
||||
return []
|
||||
|
||||
|
||||
async def get_user_auto_trading(tg_id: int, symbol: str):
|
||||
async def get_user_auto_trading(tg_id: int, symbol: str, side: str):
|
||||
"""Get user auto trading from the database asynchronously."""
|
||||
try:
|
||||
async with async_session() as session:
|
||||
@@ -1278,7 +1278,7 @@ async def get_user_auto_trading(tg_id: int, symbol: str):
|
||||
return None
|
||||
|
||||
result_auto_trading = await session.execute(
|
||||
select(UserAutoTrading).filter_by(user_id=user.id, symbol=symbol)
|
||||
select(UserAutoTrading).filter_by(user_id=user.id, symbol=symbol, side=side)
|
||||
)
|
||||
auto_trading = result_auto_trading.scalars().first()
|
||||
return auto_trading
|
||||
|
Reference in New Issue
Block a user