Add TODO for duplicate email/username inconsistency
The function `create_account_with_params` calls `_do_create_account`,
which exhibits some discrepant behavior with throwing errors when handling
duplicate email and/or username.
A duplicate email raises a `ValidationError` (rather than the expected
`AccountValidationError`) from the first part of `_do_create_account`,
when errors from `form` (the `AccountCreationForm`) are raised.
A duplicate username raises the expected `AccountValidationError`, but
from a later part of `_do_create_account`. As a result, registering with
both duplicate username and email raises a `ValidationError` for email only.
The user message for username is “An account with the Public Username
'{username}' already exists.” which differs from that of email, “It
looks like {email} belongs to an existing account. Try again with a
different email." The latter is more consistent with other user messages.
Showing
Please
register
or
sign in
to comment