Skip to content

Commit

Permalink
Fixed nil error on ldap find_entries_by
Browse files Browse the repository at this point in the history
  • Loading branch information
fantinialex authored and oliverguenther committed Jan 13, 2025
1 parent b867ec1 commit 72cb9ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/ldap/base_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def find_entries_by(login:, ldap_con: new_ldap_connection)
filter: ldap.login_filter(login),
attributes: ldap.search_attributes
)
.map { |entry| ldap.get_user_attributes_from_ldap_entry(entry).except(:dn) }
&.map { |entry| ldap.get_user_attributes_from_ldap_entry(entry).except(:dn) } || []
end

def new_ldap_connection
Expand Down

0 comments on commit 72cb9ba

Please sign in to comment.