summaryrefslogtreecommitdiffstats
path: root/openbb_terminal/common/ultima_newsmonitor_view.py
diff options
context:
space:
mode:
Diffstat (limited to 'openbb_terminal/common/ultima_newsmonitor_view.py')
-rw-r--r--openbb_terminal/common/ultima_newsmonitor_view.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/openbb_terminal/common/ultima_newsmonitor_view.py b/openbb_terminal/common/ultima_newsmonitor_view.py
index 539670e5bb6..df3afa02f4d 100644
--- a/openbb_terminal/common/ultima_newsmonitor_view.py
+++ b/openbb_terminal/common/ultima_newsmonitor_view.py
@@ -76,7 +76,11 @@ def display_news(
console.print(row["URL"] + "\n")
console.print("------------------------")
- top_headlines = ultima_newsmonitor_model.get_top_headlines(term)["summary"]
+ top_headlines = ultima_newsmonitor_model.get_top_headlines(term)
+ if "summary" in top_headlines:
+ top_headlines = top_headlines["summary"]
+ else:
+ return
if "Ultima Insights was unable to identify" in top_headlines:
console.print(
f"[red]Most Relevant Articles for {term} - {dt.datetime.now().strftime('%Y-%m-%d')}\n{top_headlines}[/red]"