Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
registration
Commits
a6bdf93c1558
Commit
6a952923
authored
Jan 13, 2017
by
Sylvain Thénault
Browse files
Fix failing test because unicity constraint handling changed in recent cw versions
parent
d51a8073cfa3
Changes
1
Show whitespace changes
Inline
Side-by-side
views.py
View file @
a6bdf93c
...
...
@@ -151,6 +151,12 @@ class RegistrationConfirmController(controller.Controller):
surname
=
data
.
get
(
qname
(
'surname'
)))
cnx
.
commit
()
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
# once. This is required because some email clients (e.g. kmail)
# start by downloading the url to find the mimetype of the resource
...
...
Write
Preview
Markdown
is supported
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