Commit c4ac69da authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

Don't use extra err_raised variable

parent 9c587b49d888
......@@ -141,7 +141,7 @@ class RegistrationConfirmController(controller.Controller):
# already logged in (e.g. regstration link replayed twice in the browser)
raise Redirect(self.success_redirect_url(self._cw.user.name()))
req.form = data # hijack for proper validation error handling
err_raised = False
err = None
try:
with self.appli.repo.internal_cnx() as cnx:
cnx.call_service('register_user',
......@@ -151,7 +151,6 @@ class RegistrationConfirmController(controller.Controller):
surname=data.get(qname('surname')))
cnx.commit()
except ValidationError, err:
err_raised = True
# XXX TEMPORARY HACK to allow registration links to work more than
# once. This is required because some email clients (e.g. kmail)
# start by downloading the url to find the mimetype of the resource
......@@ -167,7 +166,7 @@ class RegistrationConfirmController(controller.Controller):
name = cnx.user.name()
raise Redirect(self.success_redirect_url(name))
except:
if err_raised:
if err is not None:
# both registration and login failed, re-raise the previous
# ValidationError
raise err
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment