From 662fd05d244dacfde69c1a4c9a5db35d5485bf72 Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Wed, 29 Nov 2023 18:56:57 -0500 Subject: [PATCH] ongeki: bump schema ver, fix error if events lookup fails --- titles/ongeki/__init__.py | 2 +- titles/ongeki/base.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/titles/ongeki/__init__.py b/titles/ongeki/__init__.py index e4e0ce2..f12343d 100644 --- a/titles/ongeki/__init__.py +++ b/titles/ongeki/__init__.py @@ -9,4 +9,4 @@ database = OngekiData reader = OngekiReader frontend = OngekiFrontend game_codes = [OngekiConstants.GAME_CODE] -current_schema_version = 5 +current_schema_version = 6 diff --git a/titles/ongeki/base.py b/titles/ongeki/base.py index 2f87b19..7cf07be 100644 --- a/titles/ongeki/base.py +++ b/titles/ongeki/base.py @@ -171,7 +171,6 @@ class OngekiBase: "gameRankingList": ranking_list, } - def handle_get_game_point_api_request(self, data: Dict) -> Dict: get_game_point = self.data.static.get_static_game_point() game_point = [] @@ -314,6 +313,13 @@ class OngekiBase: def handle_get_game_event_api_request(self, data: Dict) -> Dict: evts = self.data.static.get_enabled_events(self.version) + if evts is None: + return { + "type": data["type"], + "length": 0, + "gameEventList": [], + } + evt_list = [] for event in evts: evt_list.append(