From 9ed60ef93f96fad984a2ec091a8737d56a71657f Mon Sep 17 00:00:00 2001 From: Tomas Jethro Pokorny Date: Mon, 18 Apr 2016 11:38:47 +0200 Subject: [PATCH] Bugfix. --- prednasky/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prednasky/views.py b/prednasky/views.py index 6f0fed53..bcaa32f5 100644 --- a/prednasky/views.py +++ b/prednasky/views.py @@ -14,8 +14,8 @@ def newPrednaska(request): for i in request.POST: if i[0] == 'q': hlasovani = Hlasovani() - print(i[1]) - hlasovani.prednaska = Prednaska.objects.filter(pk = int(i[1]))[0] + print("q:"+i[1:]) + hlasovani.prednaska = Prednaska.objects.filter(pk = int(i[1:]))[0] hlasovani.body = int(request.POST[i]) hlasovani.ucastnik = jmeno hlasovani.save()