projects
/
oweals
/
karmaworld.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47c7e49
)
conditionally check honeypot errors, closes #346
author
Bryan
<btbonval@gmail.com>
Wed, 26 Feb 2014 01:57:20 +0000
(20:57 -0500)
committer
Bryan
<btbonval@gmail.com>
Wed, 26 Feb 2014 01:57:20 +0000
(20:57 -0500)
karmaworld/apps/courses/views.py
patch
|
blob
|
history
diff --git
a/karmaworld/apps/courses/views.py
b/karmaworld/apps/courses/views.py
index 332bd7c6fef3dcdbf64626f267d8eeebcc7f4725..acf38ed24077106e5e0c625a6503607472db1bf1 100644
(file)
--- a/
karmaworld/apps/courses/views.py
+++ b/
karmaworld/apps/courses/views.py
@@
-69,7
+69,8
@@
class CourseListView(ListView, ModelFormMixin, ProcessFormView):
# hard code errors for the dynamically named honeypot field.
# This bit will not be necessary when the form is dynamically
# generated by Django rather than hard coded in the template.
- kwargs['honeypot_errors'] = [x for x in form.errors['honeypot']]
+ kwargs['honeypot_errors'] = [x for x in form.errors['honeypot']] if
+ 'honeypot' in form.errors else []
return self.render_to_response(self.get_context_data(**kwargs))