From ca9e309b1b8613aab62fca35bc04cb1c05b0373c Mon Sep 17 00:00:00 2001 From: David Taylor Date: Mon, 25 Sep 2017 23:11:00 +0100 Subject: [PATCH] Fix datetime/date check, and add https to calendar URLs --- RIGS/ical.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RIGS/ical.py b/RIGS/ical.py index c8c08597..c098a449 100644 --- a/RIGS/ical.py +++ b/RIGS/ical.py @@ -99,7 +99,7 @@ class CalendarICS(ICalFeed): return item.earliest_time def item_end_datetime(self, item): - if isinstance(item.latest_time, datetime.date): # Ical end_datetime is non-inclusive, so add a day + if type(item.latest_time) == datetime.date: # Ical end_datetime is non-inclusive, so add a day return item.latest_time + datetime.timedelta(days=1) return item.latest_time @@ -137,7 +137,7 @@ class CalendarICS(ICalFeed): # if item.notes: // Need to add proper keyholder checks before this gets put back # desc += 'Notes:\n'+item.notes+'\n\n' - base_url = "http://rigs.nottinghamtec.co.uk" + base_url = "https://rigs.nottinghamtec.co.uk" desc += 'URL = ' + base_url + str(item.get_absolute_url()) return desc