Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError at /contact/foundation/ #459

Closed
timgraham opened this issue Apr 22, 2015 · 0 comments
Closed

KeyError at /contact/foundation/ #459

timgraham opened this issue Apr 22, 2015 · 0 comments
Labels

Comments

@timgraham
Copy link
Member

If the contact form is submitted with an empty "name" field, but with the rest of the other fields filled:

Stacktrace (most recent call last):

  File "django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "django/views/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)
  File "django/views/generic/base.py", line 87, in dispatch
    return handler(request, *args, **kwargs)
  File "django/views/generic/edit.py", line 172, in post
    if form.is_valid():
  File "django/forms/forms.py", line 162, in is_valid
    return self.is_bound and not bool(self.errors)
  File "django/forms/forms.py", line 154, in errors
    self.full_clean()
  File "django/forms/forms.py", line 353, in full_clean
    self._clean_fields()
  File "django/forms/forms.py", line 371, in _clean_fields
    value = getattr(self, 'clean_%s' % name)()
  File "contact/forms.py", line 52, in clean_body
    'comment_author': self.cleaned_data['name'],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant