API: Add subevent list on organizer level

This commit is contained in:
Raphael Michel
2018-09-24 12:59:44 +02:00
parent 9935ba370d
commit ee951a7448
6 changed files with 142 additions and 4 deletions

View File

@@ -37,6 +37,9 @@ class ConditionalListView:
if_unmodified_since = request.META.get('HTTP_IF_UNMODIFIED_SINCE')
if if_unmodified_since:
if_unmodified_since = parse_http_date_safe(if_unmodified_since)
if not hasattr(request, 'event'):
return super().list(request, **kwargs)
lmd = request.event.logentry_set.filter(
content_type__model=self.queryset.model._meta.model_name,
content_type__app_label=self.queryset.model._meta.app_label,