diff --git a/contentcuration/search/viewsets/contentnode.py b/contentcuration/search/viewsets/contentnode.py index 58660fce5b..676698031d 100644 --- a/contentcuration/search/viewsets/contentnode.py +++ b/contentcuration/search/viewsets/contentnode.py @@ -52,11 +52,11 @@ def filter_channel_list(self, queryset, name, value): if value == "public": channel_ids = Channel.get_public_channels().values_list("id", flat=True) elif value == "edit" and user: - channel_ids = user.editable_channels.values_list("id", flat=True) + channel_ids = user.editable_channels.filter(deleted=False).values_list("id", flat=True) elif value == "bookmark" and user: - channel_ids = user.bookmarked_channels.values_list("id", flat=True) + channel_ids = user.bookmarked_channels.filter(deleted=False).values_list("id", flat=True) elif value == "view" and user: - channel_ids = user.view_only_channels.values_list("id", flat=True) + channel_ids = user.view_only_channels.filter(deleted=False).values_list("id", flat=True) return queryset.filter(channel_id__in=list(channel_ids))