Use PostgreSQL-compatible winner menu queries
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-09-14 21:09:36 +09:00
parent a9af9cb010
commit 9b19b82caf
3 changed files with 6 additions and 6 deletions

View File

@@ -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)
)