Use PostgreSQL-compatible winner menu queries
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -3069,8 +3069,7 @@ async def edit_winner_start(callback: CallbackQuery):
|
||||
from sqlalchemy import select
|
||||
result = await session.execute(
|
||||
select(Lottery)
|
||||
.join(Winner)
|
||||
.distinct()
|
||||
.where(select(Winner.id).where(Winner.lottery_id == Lottery.id).exists())
|
||||
.order_by(Lottery.created_at.desc())
|
||||
.limit(20)
|
||||
)
|
||||
@@ -3196,8 +3195,7 @@ async def remove_winner_start(callback: CallbackQuery):
|
||||
from sqlalchemy import select
|
||||
result = await session.execute(
|
||||
select(Lottery)
|
||||
.join(Winner)
|
||||
.distinct()
|
||||
.where(select(Winner.id).where(Winner.lottery_id == Lottery.id).exists())
|
||||
.order_by(Lottery.created_at.desc())
|
||||
.limit(20)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user