From e8915410e1c061c475ffa2836f65a3b581544b02 Mon Sep 17 00:00:00 2001 From: Jonas Havelka Date: Tue, 25 May 2021 20:07:45 +0200 Subject: [PATCH] =?UTF-8?q?aesop=20=E2=80=A6=20a=20p=C5=99edpokl=C3=A1dal?= =?UTF-8?q?=20=C5=A1patn=C3=A9=20objekty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/export.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/seminar/export.py b/seminar/export.py index 82a43fd5..d2dcdd81 100644 --- a/seminar/export.py +++ b/seminar/export.py @@ -87,12 +87,16 @@ class ExportRocnikView(generic.View): of.columns = ['id', 'name', 'surname', 'gender', 'born', 'email', 'end-year', 'street', 'town', 'postcode', 'country', 'spam-flag', 'spam-date', 'school', 'school-name', 'points', 'rank',] - + + resitele_slovnik = {} + for r in resitele: + resitele_slovnik[r.id] = r + # počítání pořadí řešitelů posledni_body = 100000 posledni_poradi = 0 for i in range(len(setrizeni_resitele)): - rd = setrizeni_resitele[i].export_row() + rd = resitele_slovnik[setrizeni_resitele[i]].export_row() if posledni_body > body[i]: posledni_body = body[i]