13494: Avoids doing unnecessary API requests on collection's move action.
authorLucas Di Pentima <lucas@di-pentima.com.ar>
Wed, 18 Nov 2020 21:41:43 +0000 (18:41 -0300)
committerLucas Di Pentima <lucas@di-pentima.com.ar>
Wed, 18 Nov 2020 21:41:43 +0000 (18:41 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas@di-pentima.com.ar>

src/store/collections/collection-move-actions.ts

index 6ccd0caaf8dba1afeaa6af58358cfd7a5dddb181..a64a7a1d699db5d973f0332565daeac441836246 100644 (file)
@@ -30,8 +30,7 @@ export const moveCollection = (resource: MoveToFormDialogData) =>
         dispatch(startSubmit(COLLECTION_MOVE_FORM_NAME));
         try {
             dispatch(progressIndicatorActions.START_WORKING(COLLECTION_MOVE_FORM_NAME));
-            await services.collectionService.update(resource.uuid, { ownerUuid: resource.ownerUuid });
-            const collection = await services.collectionService.get(resource.uuid);
+            const collection = await services.collectionService.update(resource.uuid, { ownerUuid: resource.ownerUuid });
             dispatch(projectPanelActions.REQUEST_ITEMS());
             dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_MOVE_FORM_NAME }));
             dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_MOVE_FORM_NAME));