google-code-export / django-simple-captcha

Automatically exported from code.google.com/p/django-simple-captcha
MIT License
0 stars 0 forks source link

AttributeError 'NoneType' object has no attribute 'strip' #41

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Include a captcha field in a form
2. Do not include the field in the template
3. Instantiate the form with POST data and call form.is_valid()

What is the expected output? What do you see instead?
The form should be validated or invalidated.

What version of the product are you using? On what operating system?
Version 0.2.0

Please provide any additional information below.
It is actually my fault. I use the same form for two different purposes. 
Sometimes I don't need the captcha and simply don't use it in the template. 
When I instantiate the form with the POST data the field for captcha is None. 
I have attached a patch that would not raise an exception. 

Original issue reported on code.google.com by thomasb...@gmail.com on 8 Dec 2010 at 3:12

Attachments: