summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorKaren Tracey <kmtracey@gmail.com>2010-03-05 20:17:52 +0000
committerKaren Tracey <kmtracey@gmail.com>2010-03-05 20:17:52 +0000
commit80545c3685c29854990eaf17a96fc65d428f620f (patch)
treefcab0571edeaeb17581c1f2eade5e60d56060566 /django
parenteb11229ba74d7918148f34851b6e0d2cfc16d681 (diff)
Fixed #12151: Ensured the comments code does not cause a server error when a request comes in for a comment specifying an invalid primary key value. Thanks thejaswi_puthraya.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12681 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/contrib/comments/views/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/comments/views/utils.py b/django/contrib/comments/views/utils.py
index c5c900d47f..8b729d2d95 100644
--- a/django/contrib/comments/views/utils.py
+++ b/django/contrib/comments/views/utils.py
@@ -39,7 +39,7 @@ def confirmation_view(template, doc="Display a confirmation view."):
if 'c' in request.GET:
try:
comment = comments.get_model().objects.get(pk=request.GET['c'])
- except ObjectDoesNotExist:
+ except (ObjectDoesNotExist, ValueError):
pass
return render_to_response(template,
{'comment': comment},