Improve the error message for when a new org name doesn't pass the regex.
This commit is contained in:
parent
bd47b9adf4
commit
b9a5e355eb
2 changed files with 5 additions and 2 deletions
|
@ -111,7 +111,10 @@ def create_organization(name, email, creating_user):
|
|||
|
||||
return new_org
|
||||
except InvalidUsernameException:
|
||||
raise InvalidOrganizationException('Invalid organization name: %s' % name)
|
||||
msg = ('Invalid organization name: %s Organization names must consist ' +
|
||||
'solely of lower case letters, numbers, and underscores. ' +
|
||||
'[a-z0-9_]') % name
|
||||
raise InvalidOrganizationException(msg)
|
||||
|
||||
|
||||
def create_robot(robot_shortname, parent):
|
||||
|
|
Reference in a new issue