Commit cce62b35 authored by Nick Thomas's avatar Nick Thomas

Guard discovery by username or key against bad API responses

parent 6e907f26
......@@ -208,7 +208,7 @@ class GitlabShell # rubocop:disable Metrics/ClassLength
begin
if defined?(@who)
@user = api.discover(@who)
@gl_id = "user-#{@user['id']}" if @user
@gl_id = "user-#{@user['id']}" if @user && @user.key?('id')
else
@user = api.discover(@gl_id)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment