Fix the webpage CRASH problem when the database has no article or when something bad happened on loading articles.
parent
c9bbf6b6a3
commit
6285581bb5
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue