From 6226417ad7a882ca1b434e23d34ea00d42e189ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Sat, 26 May 2018 20:14:48 +0200 Subject: [PATCH] Fix lookups that were forgotten. --- src/program/views.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/program/views.py b/src/program/views.py index 85b00db4..dcd97aeb 100644 --- a/src/program/views.py +++ b/src/program/views.py @@ -47,7 +47,9 @@ logger = logging.getLogger("bornhack.%s" % __name__) class ICSView(CampViewMixin, View): def get(self, request, *args, **kwargs): - eventinstances = models.EventInstance.objects.filter(event__camp=self.camp) + eventinstances = models.EventInstance.objects.filter( + event__track__camp=self.camp + ) # Type query type_query = request.GET.get('type', None) @@ -659,7 +661,9 @@ class NoScriptScheduleView(CampViewMixin, TemplateView): def get_context_data(self, *args, **kwargs): context = super().get_context_data(**kwargs) - context['eventinstances'] = models.EventInstance.objects.filter(event__camp=self.camp).order_by('when') + context['eventinstances'] = models.EventInstance.objects.filter( + event__track__camp=self.camp + ).order_by('when') return context