More detailed namespace validation
Fixes namespace validation to use the proper regex for checking length, as well as showing the proper messaging if the entered namespace is invalid [Delivers #137830461]
This commit is contained in:
parent
aafcb592a6
commit
462f47924e
7 changed files with 11 additions and 14 deletions
|
@ -19,11 +19,8 @@ def create_organization(name, email, creating_user, email_required=True):
|
|||
team.add_user_to_team(creating_user, owners_team)
|
||||
|
||||
return new_org
|
||||
except InvalidUsernameException:
|
||||
msg = ('Invalid organization name: %s Organization names must consist ' +
|
||||
'solely of lower case letters, numbers, and underscores. ' +
|
||||
'[a-z0-9_]') % name
|
||||
raise InvalidOrganizationException(msg)
|
||||
except InvalidUsernameException as iue:
|
||||
raise InvalidOrganizationException(iue.message)
|
||||
|
||||
|
||||
def get_organization(name):
|
||||
|
|
Reference in a new issue