mirror of
https://github.com/JonasunderscoreJones/turbo-octo-potato.git
synced 2025-10-26 02:29:18 +01:00
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:
parent
d74248ffb5
commit
fec4439d4a
1 changed files with 4 additions and 0 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue