Skip to content

Commit

Permalink
bf/check if tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
extreme4all committed Nov 21, 2024
1 parent d8ed1fe commit d5ac2f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/v2/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async def get_players_kc(
"""
repo = repoPlayer(session)
names = await asyncio.gather(*[to_jagex_name(n) for n in name])
data = await repo.get_report_score(player_names=names)
data = await repo.get_report_score(player_names=tuple(names))
return data


Expand Down
2 changes: 2 additions & 0 deletions src/app/repositories/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ async def update_session(self, session: AsyncSession):
self.session = session

async def get_report_score(self, player_names: tuple[str]):
if not isinstance(player_names, tuple):
raise Exception()
sql_select = """
select
count(rs.reporting_id) as count,
Expand Down

0 comments on commit d5ac2f3

Please sign in to comment.