Skip to content

Commit

Permalink
Merge pull request #534 from Bot-detector/develop
Browse files Browse the repository at this point in the history
normalize name
  • Loading branch information
extreme4all authored Aug 12, 2024
2 parents 1dbdce0 + 193a892 commit 8362789
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/v1/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ async def select_report_count_v2(name: str, manual_detect: int):
subject.possible_ban,
subject.confirmed_player
"""
name = await functions.to_jagex_name(name)
params = {"name": name, "manual_detect": manual_detect}

async with PLAYERDATA_ENGINE.get_session() as session:
Expand Down Expand Up @@ -279,7 +280,7 @@ async def get_report_manual_count_v1(name: str):
Get the calculated player report count
"""
migrated_record = await select_or_insert_migration(name=name)
migrated_record = migrated_record if migrated_record else {}
migrated_record = migrated_record if isinstance(migrated_record, dict) else {}
is_migrated = migrated_record.get("migrated")

if is_migrated:
Expand Down

0 comments on commit 8362789

Please sign in to comment.