mai2: Fixed cards not showing up

This commit is contained in:
Dniel97 2023-10-16 21:36:26 +02:00
parent d6e4db48f4
commit 862907b82a
Signed by untrusted user: Dniel97
GPG Key ID: 6180B3C768FB2E08

View File

@ -333,7 +333,7 @@ class Mai2ItemData(BaseData):
if result is None: if result is None:
return None return None
return result.fetchone() return result.fetchone()
def put_character_(self, user_id: int, char_data: Dict) -> Optional[int]: def put_character_(self, user_id: int, char_data: Dict) -> Optional[int]:
char_data["user"] = user_id char_data["user"] = user_id
sql = insert(character).values(**char_data) sql = insert(character).values(**char_data)
@ -489,6 +489,8 @@ class Mai2ItemData(BaseData):
else: else:
sql = card.select(and_(card.c.user == user_id, card.c.cardKind == kind)) sql = card.select(and_(card.c.user == user_id, card.c.cardKind == kind))
sql = sql.order_by(card.c.startDate.desc())
result = self.execute(sql) result = self.execute(sql)
if result is None: if result is None:
return None return None