20831: Remove debug print and add error check
authorPeter Amstutz <peter.amstutz@curii.com>
Mon, 27 Nov 2023 16:26:07 +0000 (11:26 -0500)
committerPeter Amstutz <peter.amstutz@curii.com>
Mon, 27 Nov 2023 16:26:07 +0000 (11:26 -0500)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

lib/controller/federation/conn.go

index bd5a6d812ea893307fac43cb89a2410adae77e7d..75b9f2136bde805df4e6d91e478d93d70e49f38f 100644 (file)
@@ -705,7 +705,6 @@ func (conn *Conn) batchUpdateUsers(ctx context.Context,
                        delete(updates, "is_admin")
                        delete(updates, "is_invited")
                }
-               fmt.Printf("updates %v", updates)
                batchOpts.Updates[user.UUID] = updates
        }
        if len(batchOpts.Updates) > 0 {
@@ -725,6 +724,10 @@ func (conn *Conn) includeAdminAndInvitedInBatchUpdate(ctx context.Context, be ba
        // fields aren't actually valid then we don't want to
        // send them in the batch update.
        dd, err := be.DiscoveryDocument(ctx)
+       if err != nil {
+               // couldn't get discovery document
+               return false, err
+       }
        if dd.Revision >= "20231117" {
                // newer version, fields are valid.
                return true, nil