You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2017/08/30 18:39:05 UTC

[whimsy] branch master updated: no-op if people is empty

This is an automated email from the ASF dual-hosted git repository.

rubys 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 3b61e58  no-op if people is empty
3b61e58 is described below

commit 3b61e58a7478ea1dfc0f68b2e796f123dabfc8ef
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Wed Aug 30 14:38:50 2017 -0400

    no-op if people is empty
---
 lib/whimsy/asf/ldap.rb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index d50fa3b..b0eaa71 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -1150,6 +1150,7 @@ module ASF
     def remove(people)
       @members = nil
       people = (Array(people) & members).map(&:dn)
+      return if people.empty?
       ASF::LDAP.modify(self.dn, [ASF::Base.mod_delete('member', people)])
     ensure
       @members = nil
@@ -1159,6 +1160,7 @@ module ASF
     def add(people)
       @members = nil
       people = (Array(people) - members).map(&:dn)
+      return if people.empty?
       ASF::LDAP.modify(self.dn, [ASF::Base.mod_add('member', people)])
     ensure
       @members = nil

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].