mirror of
https://gitea.tendokyu.moe/Dniel97/artemis.git
synced 2026-10-10 02:38:10 +03:00
idac: fix number plate lottery for season 3
This commit is contained in:
@@ -20,8 +20,10 @@ class IDACFactoryDb(BaseData):
|
||||
self.mapper = IDACFactoryMapper()
|
||||
|
||||
async def get_lottery(self, aime_id: int, version: int) -> Optional[LotteryDto]:
|
||||
sql = select(LotteryDb).where(
|
||||
and_(LotteryDb.user == aime_id, LotteryDb.version == version)
|
||||
sql = (
|
||||
select(LotteryDb)
|
||||
.where(and_(LotteryDb.user == aime_id, LotteryDb.version <= version))
|
||||
.order_by(LotteryDb.version.desc())
|
||||
)
|
||||
result = await self.execute(sql)
|
||||
lottery_db = result.scalars().first()
|
||||
@@ -96,7 +98,6 @@ class IDACFactoryDb(BaseData):
|
||||
return None
|
||||
return self.mapper.car_to_dto(car_db)
|
||||
|
||||
|
||||
async def get_cars(
|
||||
self, version: int, aime_id: int, only_pickup: bool = False
|
||||
) -> Optional[List[CarDto]]:
|
||||
|
||||
Reference in New Issue
Block a user