From 574176b42be3e856a830bebcd8f18e070554e5c3 Mon Sep 17 00:00:00 2001 From: Marnanel Thurman Date: Thu, 18 Feb 2021 18:47:45 +0000 Subject: [PATCH] "only_media" stub --- kepi/trilby_api/views/timelines.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kepi/trilby_api/views/timelines.py b/kepi/trilby_api/views/timelines.py index 2eb7d22..50db881 100644 --- a/kepi/trilby_api/views/timelines.py +++ b/kepi/trilby_api/views/timelines.py @@ -87,6 +87,12 @@ class AbstractTimeline(generics.ListAPIView): ) logger.debug(" -- after remote: %s", queryset) + if 'only_media' in self.request.query_params: + # We don't support media at present, so this will give us + # the empty set + queryset = queryset.none() + logger.debug(" -- after only_media: %s", queryset) + # Slicing the queryset must be done last, # since running operations on a sliced queryset # causes evaluation.