From ac0e8148107c1eb9eb7be86b0b7cfa45a4b37433 Mon Sep 17 00:00:00 2001 From: Mustafa Gezen Date: Sat, 24 Jun 2023 20:33:00 +0200 Subject: [PATCH] Hydra API can return list[str] for boostVersion --- apollo/rherrata/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apollo/rherrata/__init__.py b/apollo/rherrata/__init__.py index 45a783f..60c1970 100644 --- a/apollo/rherrata/__init__.py +++ b/apollo/rherrata/__init__.py @@ -87,7 +87,7 @@ class Advisory(JSONWizard): portal_child_ids: list[str] = None portal_product_filter: list[str] = None boostProduct: str = None - boostVersion: int = None + boostVersion: int | list[str] = None detectedProducts: list[str] = None caseCount: int = None caseCount_365: int = None @@ -208,4 +208,5 @@ class API: raise Exception((await response.text())) elif body.get("response", {}).get("numFound", 0) == 0: return [] - return Advisory.from_list(list(body["response"]["docs"])) + advisory_list = list(body["response"]["docs"]) + return Advisory.from_list(advisory_list)