fix: error on atom rebuild in some cases

This commit is contained in:
Quentin Ferrand 2022-01-14 13:58:32 +01:00
parent df1b0e9cd9
commit 66b451e842

View file

@ -39,8 +39,8 @@ def write_files(path: str, data: dict, max_num_entries: int) -> None:
new_file = False
for article in data['articles']:
art_output = write_article(article, data, path)
urls.append(art_output['url'])
if art_output.get('new_file'):
urls.append(art_output['url'])
new_file = True
index_file_write_footer(path)
# no need to update atom file if no new articles (write_article func returns url list)