Merge "Confusing log messages in project hierarchy checking"

This commit is contained in:
Jenkins 2017-09-05 01:58:54 +00:00 committed by Gerrit Code Review
commit fe87d28422
1 changed files with 7 additions and 8 deletions

View File

@ -119,19 +119,18 @@ class Manager(manager.Manager):
if parent_ref['is_domain']:
if parent_ref['id'] != domain['id']:
raise exception.ValidationError(
message=_('Cannot create project, since its parent '
'(%(domain_id)s) is acting as a domain, '
'but project\'s specified parent_id '
'(%(parent_id)s) does not match '
'this domain_id.')
% {'domain_id': domain['id'],
'parent_id': parent_ref['id']})
message=_('Cannot create project, the parent '
'(%(parent_id)s) is acting as a domain, '
'but this project\'s domain id (%(domain_id)s) '
'does not match the parent\'s id.')
% {'parent_id': parent_ref['id'],
'domain_id': domain['id']})
else:
parent_domain_id = parent_ref.get('domain_id')
if parent_domain_id != domain['id']:
raise exception.ValidationError(
message=_('Cannot create project, since it specifies '
'its owner as domain %(domain_id)s, but '
'its domain_id %(domain_id)s, but '
'specifies a parent in a different domain '
'(%(parent_domain_id)s).')
% {'domain_id': domain['id'],