Include project_id in the validation error on default project is domain
Include the project_id in the validation error message when the default project is trying to be set to a domain. Change-Id: I0f4ba70e776072e91e3e50db53e86ddd21c32a82
This commit is contained in:
parent
8a7133f950
commit
e26b806414
|
@ -834,8 +834,10 @@ class Manager(manager.Manager):
|
||||||
try:
|
try:
|
||||||
project_ref = self.resource_api.get_project(default_project_id)
|
project_ref = self.resource_api.get_project(default_project_id)
|
||||||
if project_ref['is_domain'] is True:
|
if project_ref['is_domain'] is True:
|
||||||
msg = _("User's default project ID cannot be a domain ID.")
|
msg = _("User's default project ID cannot be a "
|
||||||
raise exception.ValidationError(message=msg)
|
"domain ID: %s")
|
||||||
|
raise exception.ValidationError(
|
||||||
|
message=(msg % default_project_id))
|
||||||
except exception.ProjectNotFound:
|
except exception.ProjectNotFound:
|
||||||
# should be idempotent if project is not found so that it is
|
# should be idempotent if project is not found so that it is
|
||||||
# backward compatible
|
# backward compatible
|
||||||
|
|
Loading…
Reference in New Issue