X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/ea54fb82c3a59ca8a959643f8bec4776635433e0..fe477581df706f4c2c1669f2df584bd94dbb4bea:/src/store/collections/collection-update-actions.ts?ds=sidebyside diff --git a/src/store/collections/collection-update-actions.ts b/src/store/collections/collection-update-actions.ts index 9c859234..02ec8bb5 100644 --- a/src/store/collections/collection-update-actions.ts +++ b/src/store/collections/collection-update-actions.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: AGPL-3.0 import { Dispatch } from "redux"; -import { initialize, startSubmit, stopSubmit } from 'redux-form'; +import { FormErrors, initialize, startSubmit, stopSubmit } from 'redux-form'; import { RootState } from "~/store/store"; import { collectionPanelActions } from "~/store/collection-panel/collection-panel-action"; import { dialogActions } from "~/store/dialog/dialog-actions"; @@ -41,7 +41,7 @@ export const updateCollection = (collection: Partial) => } catch (e) { const error = getCommonResourceServiceError(e); if (error === CommonResourceServiceError.UNIQUE_VIOLATION) { - dispatch(stopSubmit(COLLECTION_UPDATE_FORM_NAME, { name: 'Collection with the same name already exists.' })); + dispatch(stopSubmit(COLLECTION_UPDATE_FORM_NAME, { name: 'Collection with the same name already exists.' } as FormErrors)); } dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_UPDATE_FORM_NAME)); return;