diff --git a/ps_data.py b/ps_data.py index 957ea020..0b4e55b4 100644 --- a/ps_data.py +++ b/ps_data.py @@ -70,12 +70,14 @@ def __init__(self, data={}, date=None, manual=False): v = datetime.datetime.strptime(v, "%H:%M").time() setattr(self, k, v) - for venue in VENUES: - if venue.from_date < self.date.date() and (venue.until_date is None or venue.until_date > self.date.date()): - self.location = venue.name - self.address = venue.address - self.description = venue.description - break + if self.location is None: + for venue in VENUES: + if venue.from_date < self.date.date() and (venue.until_date is None or venue.until_date > self.date.date()): + self.location = venue.name + self.address = venue.address + if self.description is None: + self.description = venue.description + break if self.location is None: # For some reason couldn't find it, use last venue in the list in the hope # that "current" is more helpful than blank or exploding. diff --git a/templates/event.html b/templates/event.html index e7ee08cc..b8a4b4ac 100644 --- a/templates/event.html +++ b/templates/event.html @@ -5,7 +5,7 @@ - +{% if event.description %}{% endif %} {% endblock %}