forked from Dniel97/artemis
idac: fixed version correct database loading
This commit is contained in:
parent
8fbbfe3f37
commit
3ce2111f7f
@ -346,7 +346,7 @@ class IDACItemData(BaseData):
|
||||
car.c.version <= version,
|
||||
car.c.style_car_id == style_car_id,
|
||||
)
|
||||
)
|
||||
).order_by(car.c.version.desc())
|
||||
|
||||
result = await self.execute(sql)
|
||||
if result is None:
|
||||
@ -366,8 +366,10 @@ class IDACItemData(BaseData):
|
||||
)
|
||||
else:
|
||||
sql = select(car).where(
|
||||
and_(car.c.user == aime_id, car.c.version == version)
|
||||
and_(car.c.user == aime_id, car.c.version <= version)
|
||||
)
|
||||
|
||||
sql = sql.order_by(car.c.version.desc())
|
||||
|
||||
result = await self.execute(sql)
|
||||
if result is None:
|
||||
|
@ -281,7 +281,7 @@ class IDACProfileData(BaseData):
|
||||
profile.c.user == aime_id,
|
||||
profile.c.version <= version,
|
||||
)
|
||||
)
|
||||
).order_by(profile.c.version.desc())
|
||||
|
||||
result = await self.execute(sql)
|
||||
if result is None:
|
||||
@ -338,7 +338,7 @@ class IDACProfileData(BaseData):
|
||||
rank.c.user == aime_id,
|
||||
rank.c.version <= version,
|
||||
)
|
||||
)
|
||||
).order_by(rank.c.version.desc())
|
||||
|
||||
result = await self.execute(sql)
|
||||
if result is None:
|
||||
@ -351,7 +351,7 @@ class IDACProfileData(BaseData):
|
||||
stock.c.user == aime_id,
|
||||
stock.c.version <= version,
|
||||
)
|
||||
)
|
||||
).order_by(stock.c.version.desc())
|
||||
|
||||
result = await self.execute(sql)
|
||||
if result is None:
|
||||
@ -364,7 +364,7 @@ class IDACProfileData(BaseData):
|
||||
theory.c.user == aime_id,
|
||||
theory.c.version <= version,
|
||||
)
|
||||
)
|
||||
).order_by(theory.c.version.desc())
|
||||
|
||||
result = await self.execute(sql)
|
||||
if result is None:
|
||||
@ -377,7 +377,7 @@ class IDACProfileData(BaseData):
|
||||
tips.c.user == aime_id,
|
||||
tips.c.version <= version,
|
||||
)
|
||||
)
|
||||
).order_by(tips.c.version.desc())
|
||||
|
||||
result = await self.execute(sql)
|
||||
if result is None:
|
||||
|
Loading…
Reference in New Issue
Block a user