This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new ad47edb Improve check for empty instance
ad47edb is described below
commit ad47edbda72cc3ac0f8fe5b0e5753bba33a3568c
Author: Sebb <[email protected]>
AuthorDate: Sat Feb 9 14:19:07 2019 +0000
Improve check for empty instance
---
lib/whimsy/asf/ldap.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index 67606a4..b1fc984 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -1253,8 +1253,8 @@ module ASF
# return committee only if it actually exists
def self.[] name
committee = super
- return committee if self.isGuineaPig? name
- committee.members.empty? ? nil : committee
+ # cheaper/safer check than looking at members
+ committee.dn ? committee : nil
end
# setter for members attribute, should only be used by