Skip to content
Snippets Groups Projects
Commit 56e6af19 authored by HeJ's avatar HeJ
Browse files

plainui: sort events on TagView, too

fixes wrong display shown in #663
parent d7e3b78a
No related branches found
No related tags found
No related merge requests found
......@@ -126,10 +126,12 @@ class TagView(ConferenceRequiredMixin, TemplateView):
context['tag'] = tag
# TODO other types. What should we link here?
# TODO: consider using views.utils.event_filter() here
context['events'] = (
Event.objects.conference_accessible(self.conf)
.filter(id__in=TagItem.objects.filter(tag=tag, target_type=ContentType.objects.get_for_model(Event)).values_list('target_id'))
.filter(schedule_start__isnull=False, schedule_end__isnull=False)
.order_by('schedule_start', 'schedule_end')
)
context['my_favorite_events'] = session_get_favorite_events(self.request.session, self.request.user)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment