[ARVADOS] updated: fd14dc21b4dc52b3168f32a644a4167cc55ab919

Git user git at public.curoverse.com
Tue Sep 26 23:52:00 EDT 2017


Summary of changes:
 sdk/python/arvados/commands/sync_groups.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

       via  fd14dc21b4dc52b3168f32a644a4167cc55ab919 (commit)
      from  596a5436204bc644b825987707ea295a71c58188 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit fd14dc21b4dc52b3168f32a644a4167cc55ab919
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Wed Sep 27 00:44:47 2017 -0300

    12018: Avoid making duplicate api calls to add an already added user when
    the input file has the same line more than once.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/sdk/python/arvados/commands/sync_groups.py b/sdk/python/arvados/commands/sync_groups.py
index 2bc08e2..a1125de 100644
--- a/sdk/python/arvados/commands/sync_groups.py
+++ b/sdk/python/arvados/commands/sync_groups.py
@@ -150,7 +150,8 @@ def main(arguments=None, stdout=sys.stdout, stderr=sys.stderr):
                     groups_created += 1
                 # Both group & user exist, check if user is a member
                 g_uuid = group_name_to_uuid[group]
-                if not user in remote_groups[g_uuid]['previous_members']:
+                if not (user in remote_groups[g_uuid]['previous_members'] or
+                        user in remote_groups[g_uuid]['current_members']):
                     # User wasn't a member, but should.
                     api_client.links().create(body={
                         'link_class': 'permission',

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list