diff options
author | markgibbons <mark.gibbons@nordstrom.com> | 2017-09-29 19:54:19 -0700 |
---|---|---|
committer | markgibbons <mark.gibbons@nordstrom.com> | 2017-09-29 20:10:13 -0700 |
commit | ca4caad987e98b4d09d05ccdaa23543caeb86db4 (patch) | |
tree | 5fe96871b1800e916a1f58edc6552440b1110988 /lib | |
parent | 8b91c383a5e88d5039163831f50f8bc42673bb61 (diff) | |
download | chef-ca4caad987e98b4d09d05ccdaa23543caeb86db4.tar.gz |
invites_sort_fail: Clean the invites array before sorting it
Sort threw an error trying to compare nil with a string while running
knife ec backup. This change deletes the nil entries before sorting.
Signed-off-by: markgibbons <mark.gibbons@nordstrom.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb b/lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb index c5a5f873c5..7ae08823b8 100644 --- a/lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb +++ b/lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb @@ -5,7 +5,7 @@ class Chef module DataHandler class OrganizationInvitesDataHandler < DataHandlerBase def normalize(invites, entry) - invites.map { |invite| invite.is_a?(Hash) ? invite["username"] : invite }.sort.uniq + invites.map { |invite| invite.is_a?(Hash) ? invite["username"] : invite }.compact.sort.uniq end def minimize(invites, entry) |