From fec4439d4a133a2a07134f46c3fbc0a5e1a61d91 Mon Sep 17 00:00:00 2001 From: Jonas_Jones <91549607+J-onasJones@users.noreply.github.com> Date: Sat, 16 Dec 2023 03:32:58 +0100 Subject: [PATCH] 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 --- rpopfetch.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rpopfetch.py b/rpopfetch.py index b7c4ef6..d5bee45 100644 --- a/rpopfetch.py +++ b/rpopfetch.py @@ -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 = {