From a8b33f12080ad3f8129218e6d863f20b11e413ee Mon Sep 17 00:00:00 2001 From: extreme4all <40169115+extreme4all@users.noreply.github.com> Date: Thu, 1 Aug 2024 00:26:20 +0200 Subject: [PATCH 1/2] normally better --- src/api/v1/report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/v1/report.py b/src/api/v1/report.py index edec8c5..f33aa04 100644 --- a/src/api/v1/report.py +++ b/src/api/v1/report.py @@ -279,7 +279,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: From 193a892bb05736d4b98bc21bfb5ffc9b6e2f75eb Mon Sep 17 00:00:00 2001 From: extreme4all <40169115+extreme4all@users.noreply.github.com> Date: Sun, 11 Aug 2024 16:13:51 +0200 Subject: [PATCH 2/2] name to jagex name --- src/api/v1/report.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/v1/report.py b/src/api/v1/report.py index f33aa04..0b81176 100644 --- a/src/api/v1/report.py +++ b/src/api/v1/report.py @@ -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: