From 806dd717e6456a47f569fae2f7a05b3f1dc5d46f Mon Sep 17 00:00:00 2001 From: Hay1tsme Date: Mon, 27 Feb 2023 11:39:42 -0500 Subject: [PATCH] maidx: fix score, playlog and courses not saving properly --- titles/mai2/schema/score.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/titles/mai2/schema/score.py b/titles/mai2/schema/score.py index 0ef6da4..1b4d65d 100644 --- a/titles/mai2/schema/score.py +++ b/titles/mai2/schema/score.py @@ -161,6 +161,7 @@ course = Table( class Mai2ScoreData(BaseData): def put_best_score(self, user_id: int, score_data: Dict) -> Optional[int]: + score_data["user"] = user_id sql = insert(best_score).values(**score_data) conflict = sql.on_duplicate_key_update(**score_data) @@ -197,6 +198,7 @@ class Mai2ScoreData(BaseData): return result.fetchone() def put_playlog(self, user_id: int, playlog_data: Dict) -> Optional[int]: + playlog_data["user"] = user_id sql = insert(playlog).values(**playlog_data) conflict = sql.on_duplicate_key_update(**playlog_data) @@ -208,6 +210,7 @@ class Mai2ScoreData(BaseData): return result.lastrowid def put_course(self, user_id: int, course_data: Dict) -> Optional[int]: + course_data["user"] = user_id sql = insert(course).values(**course_data) conflict = sql.on_duplicate_key_update(**course_data)