Fix error where everything looks like it has a video.

This commit is contained in:
Vidir Valberg Gudmundsson 2017-07-15 18:16:27 +02:00
parent c5ae8f4d6e
commit 5b1d1c79e9

View file

@ -543,9 +543,11 @@ class EventInstance(CampRelatedModel):
'location_icon': self.location.icon,
'timeslots': self.timeslots,
'video_recording': self.event.video_recording,
'video_url': self.event.video_url,
}
if self.event.video_url:
data['video_url'] = self.event.video_url
if user and user.is_authenticated:
is_favorited = user.favorites.filter(event_instance=self).exists()
data['is_favorited'] = is_favorited