forked from Dniel97/artemis
Merge pull request 'Ongeki: Fix issue with technical award folder counts not being saved properly' (#128) from Kumubou/artemis:develop into develop
Reviewed-on: Hay1tsme/artemis#128
This commit is contained in:
commit
36ab38b1ee
@ -426,9 +426,10 @@ class OngekiBase:
|
|||||||
userTechCountList = []
|
userTechCountList = []
|
||||||
|
|
||||||
for tc in utcl:
|
for tc in utcl:
|
||||||
tc.pop("id")
|
tmp = tc._asdict()
|
||||||
tc.pop("user")
|
tmp.pop("id")
|
||||||
userTechCountList.append(tc)
|
tmp.pop("user")
|
||||||
|
userTechCountList.append(tmp)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"userId": data["userId"],
|
"userId": data["userId"],
|
||||||
|
@ -129,7 +129,13 @@ tech_count = Table(
|
|||||||
|
|
||||||
class OngekiScoreData(BaseData):
|
class OngekiScoreData(BaseData):
|
||||||
async def get_tech_count(self, aime_id: int) -> Optional[List[Dict]]:
|
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]:
|
async def put_tech_count(self, aime_id: int, tech_count_data: Dict) -> Optional[int]:
|
||||||
tech_count_data["user"] = aime_id
|
tech_count_data["user"] = aime_id
|
||||||
|
Loading…
Reference in New Issue
Block a user