diff options
author | John Keiser <jkeiser@opscode.com> | 2014-08-21 16:20:12 -0700 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2014-08-22 09:20:50 -0700 |
commit | 965edb4205202d9c0237041f3014af8fbdaec235 (patch) | |
tree | 3450d9443054805a0f03932f5f7280a4b1e016c4 /lib | |
parent | c5db8bb9383b6e5b94776043985714fc35196c1e (diff) | |
download | chef-zero-965edb4205202d9c0237041f3014af8fbdaec235.tar.gz |
Don't set type / membership unless json retrieved
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef_zero/endpoints/principal_endpoint.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/chef_zero/endpoints/principal_endpoint.rb b/lib/chef_zero/endpoints/principal_endpoint.rb index 896fc8c..f4c2f30 100644 --- a/lib/chef_zero/endpoints/principal_endpoint.rb +++ b/lib/chef_zero/endpoints/principal_endpoint.rb @@ -19,8 +19,10 @@ module ChefZero org_member = true else json = get_data(request, [ 'users', name ], :nil) - type = 'user' - org_member = false + if json + type = 'user' + org_member = false + end end end if json |