Merge pull request #2060 from coreos-inc/gitlab-user-exception
Fix TypeError in Gitlab trigger when user not found
This commit is contained in:
commit
0954240ccb
1 changed files with 4 additions and 1 deletions
|
@ -337,8 +337,11 @@ class GitLabBuildTrigger(BuildTriggerHandler):
|
|||
def lookup_user(self, email):
|
||||
gl_client = self._get_authorized_client()
|
||||
try:
|
||||
[user] = gl_client.getusers(search=email)
|
||||
result = gl_client.getusers(search=email)
|
||||
if result is False:
|
||||
return None
|
||||
|
||||
[user] = result
|
||||
return {
|
||||
'username': user['username'],
|
||||
'html_url': gl_client.host + '/' + user['username'],
|
||||
|
|
Reference in a new issue