Browse Source

list of attached items added

master
Mohsen Taba 1 week ago
parent
commit
3ace94f3e0
  1. 4
      apps/podcast/views_admin.py
  2. 4
      apps/video/views_admin.py

4
apps/podcast/views_admin.py

@ -77,6 +77,10 @@ class AdminPodcastViewSet(ModelViewSet):
if collection_id and collection_id != "all":
queryset = queryset.filter(collections__id=collection_id)
unattached = self.request.query_params.get("unattached")
if unattached == "true":
queryset = queryset.filter(playlist_appearances__isnull=True)
return queryset.distinct().order_by("-created_at")

4
apps/video/views_admin.py

@ -74,6 +74,10 @@ class AdminVideoViewSet(ModelViewSet):
if video_type and video_type != "all":
queryset = queryset.filter(video_type=video_type)
unattached = self.request.query_params.get("unattached")
if unattached == "true":
queryset = queryset.filter(playlist_appearances__isnull=True)
return queryset.order_by("-created_at")

Loading…
Cancel
Save