Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
Respect My Net
Commits
a34527d1
Commit
a34527d1
authored
Sep 24, 2011
by
stef
Browse files
[fix] 404 on already confirmed
parent
ca443e6b
Changes
1
Show whitespace changes
Inline
Side-by-side
bt/views.py
View file @
a34527d1
...
...
@@ -97,8 +97,10 @@ def confirm(request, id, name=None):
return
HttpResponse
(
unicode
(
_
(
"Thank you, this has been already confirmed"
)))
c
.
save
()
return
HttpResponse
(
'<div class="confirm_thanks">%s</div>'
%
unicode
(
_
(
'Thank you for your confirmation'
))
)
c
=
Confirmation
.
objects
.
get
(
key
=
id
)
if
c
:
try
:
c
=
get_object_or_404
(
Confirmation
,
key
=
id
)
except
:
return
HttpResponse
(
unicode
(
_
(
"Thank you, this has been already confirmed"
)))
c
.
key
=
''
c
.
save
()
messages
.
add_message
(
request
,
messages
.
INFO
,
unicode
(
_
(
'Thank you for verifying your confirmation'
)))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment