From 1346bab9112c16829fb064d4826627a177ec6e7b Mon Sep 17 00:00:00 2001 From: Kumubou Date: Wed, 17 Apr 2024 00:45:05 +0000 Subject: [PATCH] Implement get_tech_count (it was stubbed out) --- titles/ongeki/schema/score.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/titles/ongeki/schema/score.py b/titles/ongeki/schema/score.py index 4770725..dc3a91d 100644 --- a/titles/ongeki/schema/score.py +++ b/titles/ongeki/schema/score.py @@ -129,7 +129,13 @@ tech_count = Table( class OngekiScoreData(BaseData): async def get_tech_count(self, aime_id: int) -> Optional[List[Dict]]: - return [] + sql = select(tech_count).where(tech_count.c.user == aime_id) + + result = self.execute(sql) + + if result is None: + return None + return result.fetchall() async def put_tech_count(self, aime_id: int, tech_count_data: Dict) -> Optional[int]: tech_count_data["user"] = aime_id