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

Fix failing test because unicity constraint handling changed in recent cw versions

parent d51a8073cfa3
...@@ -151,6 +151,12 @@ class RegistrationConfirmController(controller.Controller): ...@@ -151,6 +151,12 @@ class RegistrationConfirmController(controller.Controller):
surname=data.get(qname('surname'))) surname=data.get(qname('surname')))
cnx.commit() cnx.commit()
except ValidationError, err: except ValidationError, err:
if 'login' in err.errors and 'unicity constraint' in err.errors['login']:
err.errors.pop('', None)
err.errors.pop('login', None)
err.errors['login-subject'] = _(
'the value "admin" is already used, use another one')
err.entity = None
# XXX TEMPORARY HACK to allow registration links to work more than # XXX TEMPORARY HACK to allow registration links to work more than
# once. This is required because some email clients (e.g. kmail) # once. This is required because some email clients (e.g. kmail)
# start by downloading the url to find the mimetype of the resource # start by downloading the url to find the mimetype of the resource
......
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