From 862907b82ad58d4f6854c06c25dd5248c92c676e Mon Sep 17 00:00:00 2001 From: Dniel97 Date: Mon, 16 Oct 2023 21:36:26 +0200 Subject: [PATCH] mai2: Fixed cards not showing up --- titles/mai2/schema/item.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/titles/mai2/schema/item.py b/titles/mai2/schema/item.py index d57a993..5bc011c 100644 --- a/titles/mai2/schema/item.py +++ b/titles/mai2/schema/item.py @@ -333,7 +333,7 @@ class Mai2ItemData(BaseData): if result is None: return None return result.fetchone() - + def put_character_(self, user_id: int, char_data: Dict) -> Optional[int]: char_data["user"] = user_id sql = insert(character).values(**char_data) @@ -489,6 +489,8 @@ class Mai2ItemData(BaseData): else: 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) if result is None: return None