Commit 9dafe09f authored by fred's avatar fred
Browse files

don't force queryset to be executed

parent 45129f6c
......@@ -52,7 +52,7 @@ class EmissionDetailView(DetailView):
# get all episodes, with an additional attribute to get the date of
# their first diffusion
context['episodes'] = list(
context['episodes'] = \
Episode.objects.select_related().filter(emission=self.object
).extra(select={
'first_diffusion': 'emissions_diffusion.datetime',
......@@ -62,7 +62,7 @@ class EmissionDetailView(DetailView):
FROM emissions_diffusion
WHERE episode_id = emissions_episode.id)'''],
tables=['emissions_diffusion'],
).order_by('-first_diffusion'))
).order_by('-first_diffusion')
# get all related soundfiles in a single query
soundfiles = {}
......
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