From 6285581bb5ce49b9bdfee048b13b14f3b7108a5e Mon Sep 17 00:00:00 2001 From: Lan Hui <1348141770@qq.com> Date: Thu, 12 Mar 2026 16:00:53 +0800 Subject: [PATCH] Fix the webpage CRASH problem when the database has no article or when something bad happened on loading articles. --- app/Article.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Article.py b/app/Article.py index 98d56b6..331ecf8 100644 --- a/app/Article.py +++ b/app/Article.py @@ -106,7 +106,7 @@ def get_today_article(user_word_list, visited_articles): text_level = text_difficulty_level(d['text'], d3) result_of_generate_article = "found" - today_article = None + today_article = {} if d: oxford_words = load_oxford_words(oxford_words_path) oxford_word_count, total_words = count_oxford_words(d['text'],oxford_words)