diff --git a/unipoly-mlmmj-ldap-sync b/unipoly-mlmmj-ldap-sync index 37767a1..d3f8d5c 100755 --- a/unipoly-mlmmj-ldap-sync +++ b/unipoly-mlmmj-ldap-sync @@ -156,7 +156,7 @@ def main filter = Net::LDAP::Filter.eq('cn', list_name) matched_ldap_groups = conn.search(base: basetree, filter: filter) - if matched_ldap_groups.empty? + if matched_ldap_groups.nil? || matched_ldap_groups.empty? # Could not find matching LDAP group puts 'NOT FOUND' else