Commit 5042c1ba authored by fred's avatar fred
Browse files

do not allow any episode under any emission

parent a6acb375
......@@ -113,9 +113,11 @@ class EpisodeDetailView(DetailView, EmissionMixin):
context['diffusions'] = Diffusion.objects.select_related().filter('datetime')
context['emission'] = Emission.objects.get(slug=self.kwargs.get('emission_slug'))
context['emission'] = context['episode'].emission
except Emission.DoesNotExist:
raise Http404()
if self.kwargs.get('emission_slug') != context['emission'].slug:
raise Http404()
return context
episode = EpisodeDetailView.as_view()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment