From 66a39246db6bd007d7350b0efd23caa26a36a860 Mon Sep 17 00:00:00 2001 From: assafelovic Date: Sun, 23 Jun 2024 12:49:42 +0300 Subject: [PATCH] fixed issue with subtopics returning none in some cases --- backend/report_type/detailed_report/detailed_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/report_type/detailed_report/detailed_report.py b/backend/report_type/detailed_report/detailed_report.py index 0a2b1f52e..754f9a456 100644 --- a/backend/report_type/detailed_report/detailed_report.py +++ b/backend/report_type/detailed_report/detailed_report.py @@ -59,7 +59,7 @@ async def _initial_research(self): async def _get_all_subtopics(self) -> list: subtopics = await self.main_task_assistant.get_subtopics() - return subtopics.dict()["subtopics"] + return subtopics.dict().get("subtopics", []) async def _generate_subtopic_reports(self, subtopics: list) -> tuple: subtopic_reports = []