From 4dd5ca6e9fb4c95d9834fb292d6d2d52abfa6861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Koci=C3=A1n?= Date: Thu, 11 Feb 2016 23:20:32 +0100 Subject: [PATCH] =?UTF-8?q?Korektury:=20stahuj=20opravy=20jen=201x=20pro?= =?UTF-8?q?=20ka=C5=BEdou=20stranu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit oprava Marblem nalezeného bugu --- korektury/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/korektury/views.py b/korektury/views.py index e50f7458..99f71e00 100644 --- a/korektury/views.py +++ b/korektury/views.py @@ -134,8 +134,8 @@ class KorekturyView(generic.TemplateView): else: zasluhy[k.autor]=1 - strany = opravy.values('strana') - opravy_na_stranu = [{'strana':s['strana'],'op_id':opravy.filter(strana=s['strana'])} for s in strany] + strany = set(o.strana for o in opravy) + opravy_na_stranu = [{'strana': s, 'op_id': opravy.filter(strana=s)} for s in strany] context['opravy_strany'] = opravy_na_stranu context['opravy'] = opravy