From 46e41b765dbb0c5149763cd0569e672351cfc481 Mon Sep 17 00:00:00 2001 From: Marian Sigler Date: Mon, 13 Feb 2017 12:28:35 +0100 Subject: fix not being able to create new courses --- app/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/forms.py b/app/forms.py index 355314c..2870fca 100644 --- a/app/forms.py +++ b/app/forms.py @@ -30,7 +30,7 @@ class UploadForm(Form): def validate_course(form, field): data = form.course.data - if (data, data) not in field.choices or data == '': + if data not in (k for k,v in field.choices) or data == '': raise ValidationError(u'Bitte wähle einen Kurs!') -- cgit v1.2.3-1-g7c22