[ARVADOS-WORKBENCH2] updated: 2.1.0-127-g2cabc3d9

Git user git at public.arvados.org
Fri Dec 11 15:54:26 UTC 2020


Summary of changes:
 src/services/collection-service/collection-service.ts | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

       via  2cabc3d906f0e1b926072187834fff181656d6e5 (commit)
      from  09a02c42b441f2191641649e5193ea0a39a35e58 (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 2cabc3d906f0e1b926072187834fff181656d6e5
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Fri Dec 11 12:41:30 2020 -0300

    17152: Avoids doing one extra request to persist versions on update.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/src/services/collection-service/collection-service.ts b/src/services/collection-service/collection-service.ts
index 3280d05e..92273933 100644
--- a/src/services/collection-service/collection-service.ts
+++ b/src/services/collection-service/collection-service.ts
@@ -31,12 +31,8 @@ export class CollectionService extends TrashableResourceService<CollectionResour
         return super.create({ ...data, preserveVersion: true });
     }
 
-    async update(uuid: string, data: Partial<CollectionResource>) {
-        // First make the changes
-        const collection = await super.update(uuid, data);
-        if (data === { preserveVersion: true }) { return collection; }
-        // Then set the head version to be preserved
-        return await super.update(uuid, { preserveVersion: true });
+    update(uuid: string, data: Partial<CollectionResource>) {
+        return super.update(uuid, { ...data, preserveVersion: true });
     }
 
     async files(uuid: string) {

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list