Eliminate all of the exceptions when running the tests.

This commit is contained in:
jakedt 2014-03-18 15:58:37 -04:00
parent e1b704bdac
commit 6f39e158d6
10 changed files with 50 additions and 10 deletions

View file

@ -33,7 +33,8 @@ class EntitySearch(ApiResource):
except model.InvalidOrganizationException:
# namespace name was a user
if get_authenticated_user().username == namespace_name:
user = get_authenticated_user()
if user and user.username == namespace_name:
robot_namespace = namespace_name
users = model.get_matching_users(prefix, robot_namespace, organization)