Skip to content
This repository has been archived by the owner on Mar 30, 2021. It is now read-only.

Commit

Permalink
Revert "Enforce valid captcha only if required, so tests can relax ca…
Browse files Browse the repository at this point in the history
…ptcha requirement"

This reverts commit c3c450b. It wasn't
such a great idea.
  • Loading branch information
lmorchard committed Jun 15, 2011
1 parent c3c450b commit 3f5b1e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion captcha/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def clean(self, values):
recaptcha_response_value = smart_unicode(values[1])
check_captcha = captcha.submit(recaptcha_challenge_value,
recaptcha_response_value, settings.RECAPTCHA_PRIVATE_KEY, {})
if self.required and not check_captcha.is_valid:
if not check_captcha.is_valid:
raise forms.util.ValidationError(
self.error_messages['captcha_invalid'])
return values[0]
Expand Down

0 comments on commit 3f5b1e8

Please sign in to comment.