X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/c324b64f3b26e79b4640b6f0cf55671f1a261bca..64b25cb874d430f23d169606265c9534a52bdc6c:/src/store/collections/collection-copy-actions.ts diff --git a/src/store/collections/collection-copy-actions.ts b/src/store/collections/collection-copy-actions.ts index 058d2dd4..d0387609 100644 --- a/src/store/collections/collection-copy-actions.ts +++ b/src/store/collections/collection-copy-actions.ts @@ -30,10 +30,10 @@ export const copyCollection = (resource: CopyFormDialogData) => const collection = await services.collectionService.get(resource.uuid); const uuidKey = 'uuid'; delete collection[uuidKey]; - await services.collectionService.create({ ...collection, ownerUuid: resource.ownerUuid, name: resource.name }); + const newCollection = await services.collectionService.create({ ...collection, ownerUuid: resource.ownerUuid, name: resource.name }); dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_COPY_FORM_NAME })); dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_COPY_FORM_NAME)); - return collection; + return newCollection; } catch (e) { const error = getCommonResourceServiceError(e); if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {