Remove unnecessary check to see if trustee exists

Previously we check if the returned trustee value is None, this
is already done at the backend level.

Change-Id: I801bed09300782e289ee505612df09f7270fcb4e
This commit is contained in:
Steve Martinelli 2014-02-11 02:19:57 -06:00
parent 6ed19c228f
commit 17842fffa3
1 changed files with 1 additions and 3 deletions

View File

@ -146,9 +146,7 @@ class TrustV3(controller.V3Controller):
user_id = self._get_user_id(context)
_trustor_only(context, trust, user_id)
#confirm that the trustee exists
trustee_ref = self.identity_api.get_user(trust['trustee_user_id'])
if not trustee_ref:
raise exception.UserNotFound(user_id=trust['trustee_user_id'])
self.identity_api.get_user(trust['trustee_user_id'])
all_roles = self.assignment_api.list_roles()
clean_roles = self._clean_role_list(context, trust, all_roles)
if trust.get('project_id'):