Commit 3550fea9 authored by Nicholas J Anderson's avatar Nicholas J Anderson

Handle undefined variable

parent cb4f098b
Pipeline #4459 passed with stage
in 3 minutes and 47 seconds
......@@ -6,6 +6,7 @@ import feedparser
from bs4 import BeautifulSoup
import requests
# DEV REMINDER: CHANGE THE LINES IN INTIALISATION ERROR MESSAGE (LINE 138)
......@@ -62,7 +63,7 @@ def load_gc_data():
# this handles events which start and end on the same day
# if we've found an error, there's no point in continuing
if (datetime.count("(") == 1) and (error == []):
if datetime and (datetime.count("(") == 1) and (error == []):
# parses out date info
try:
datesplit = datetime.split(", ")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment