15027: Fixes collection update requests to only send what's being updated.
[arvados-workbench2.git] / src / store / collections / collection-move-actions.ts
index dc73e5a515bdc9d07d34b1361ba656d98380ab6c..0351e746b3c8a334d0f950a7cc280f7cec40d96b 100644 (file)
@@ -30,8 +30,8 @@ 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);
-            await services.collectionService.update(resource.uuid, { ...collection, ownerUuid: resource.ownerUuid });
             dispatch(projectPanelActions.REQUEST_ITEMS());
             dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_MOVE_FORM_NAME }));
             dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_MOVE_FORM_NAME));