fix podcasts

This commit is contained in:
bkfox
2024-04-30 21:47:07 +02:00
parent 1344e2dce1
commit 31e22beaab
3 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@ __all__ = ("Episode",)
class EpisodeQuerySet(ProgramChildQuerySet):
def with_podcasts(self):
return self.filter(episodesound__sound__is_public=True).distinct()
return self.filter(episodesound__sound__is_public=True, episodesound__sound__is_removed=False).distinct()
class Episode(ChildPage):
@ -37,7 +37,7 @@ class Episode(ChildPage):
@cached_property
def podcasts(self):
"""Return serialized data about podcasts."""
query = self.episodesound_set.all().public().order_by("-broadcast", "position")
query = self.episodesound_set.available().public().order_by("-broadcast", "position")
return self._to_podcasts(query)
@cached_property