X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/e4b54c3b5d99c99553e319ead28c3aa8dcd6eecc..fe477581df706f4c2c1669f2df584bd94dbb4bea:/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 e5a6676c..0ce92dfa 100644 --- a/src/store/collections/collection-copy-actions.ts +++ b/src/store/collections/collection-copy-actions.ts @@ -4,7 +4,7 @@ import { Dispatch } from "redux"; import { dialogActions } from "~/store/dialog/dialog-actions"; -import { initialize, startSubmit, stopSubmit } from 'redux-form'; +import { FormErrors, initialize, startSubmit, stopSubmit } from 'redux-form'; import { resetPickerProjectTree } from '~/store/project-tree-picker/project-tree-picker-actions'; import { RootState } from '~/store/store'; import { ServiceRepository } from '~/services/services'; @@ -39,7 +39,10 @@ export const copyCollection = (resource: CopyFormDialogData) => } catch (e) { const error = getCommonResourceServiceError(e); if (error === CommonResourceServiceError.UNIQUE_VIOLATION) { - dispatch(stopSubmit(COLLECTION_COPY_FORM_NAME, { ownerUuid: 'A collection with the same name already exists in the target project.' })); + dispatch(stopSubmit( + COLLECTION_COPY_FORM_NAME, + { ownerUuid: 'A collection with the same name already exists in the target project.' } as FormErrors + )); } else { dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_COPY_FORM_NAME })); throw new Error('Could not copy the collection.');