summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom May <thom@may.lt>2018-02-22 08:40:25 +0000
committerGitHub <noreply@github.com>2018-02-22 08:40:25 +0000
commit8dfedb088cfb9859c0ffdb6783b9c72d4d5dad99 (patch)
treeaab88e0994e7894042b23323708b695816e8e4e7
parent3ae989a40029813df47e4c70b6e71e919e908a20 (diff)
parenta13129147376eabb9210ebad15d03173a36936dd (diff)
downloadchef-8dfedb088cfb9859c0ffdb6783b9c72d4d5dad99.tar.gz
Merge pull request #6891 from chef/sort_invites
invites_sort_fail: Clean the invites array before sorting it
-rw-r--r--lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb2
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)