13494: Avoids doing unnecessary API requests on collection's move action.
[arvados-workbench2.git] / 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));