Fixed empty links list issue

Fixed an issue where in the case that an entry had no links, it's links value would be none and not an empty list
This commit is contained in:
Jonas_Jones 2023-12-16 03:32:58 +01:00
parent d74248ffb5
commit fec4439d4a

View file

@ -180,6 +180,10 @@ def convert_monthly_content_to_json(content, year, month):
# remove the "th", "st", "nd", "rd" from the day
parts[0] = parts[0].replace('th', '').replace('st', '').replace('nd', '').replace('rd', '')
# make the links an empty list if it's null
if parts[5] == None:
parts[5] = []
# create a json entry from the parsed data
json_entry = {